mirror of
https://github.com/markqvist/LXMF.git
synced 2025-02-26 09:51:12 -05:00
Outbound procedure fix
This commit is contained in:
parent
b57960227d
commit
3d53ca0124
15
LXMF/LXMF.py
15
LXMF/LXMF.py
@ -71,6 +71,12 @@ class LXMessage:
|
|||||||
PLAIN_PACKET_MDU = RNS.Packet.PLAIN_MDU
|
PLAIN_PACKET_MDU = RNS.Packet.PLAIN_MDU
|
||||||
PLAIN_PACKET_MAX_CONTENT = PLAIN_PACKET_MDU - LXMF_OVERHEAD + DESTINATION_LENGTH
|
PLAIN_PACKET_MAX_CONTENT = PLAIN_PACKET_MDU - LXMF_OVERHEAD + DESTINATION_LENGTH
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
if self.hash != None:
|
||||||
|
return "<LXMessage "+RNS.hexrep(self.hash, delimit=False)+">"
|
||||||
|
else:
|
||||||
|
return "<LXMessage>"
|
||||||
|
|
||||||
def __init__(self, destination, source, content = "", title = "", fields = None, desired_method = None, destination_hash = None, source_hash = None):
|
def __init__(self, destination, source, content = "", title = "", fields = None, desired_method = None, destination_hash = None, source_hash = None):
|
||||||
if isinstance(destination, RNS.Destination) or destination == None:
|
if isinstance(destination, RNS.Destination) or destination == None:
|
||||||
self.__destination = destination
|
self.__destination = destination
|
||||||
@ -406,13 +412,14 @@ class LXMRouter:
|
|||||||
self.__delivery_callback = callback
|
self.__delivery_callback = callback
|
||||||
|
|
||||||
def handle_outbound(self, lxmessage):
|
def handle_outbound(self, lxmessage):
|
||||||
RNS.log("LXM Router received outbound message: "+str(lxmessage))
|
|
||||||
while self.processing_outbound:
|
|
||||||
time.sleep(0.1)
|
|
||||||
|
|
||||||
if not lxmessage.packed:
|
if not lxmessage.packed:
|
||||||
lxmessage.pack()
|
lxmessage.pack()
|
||||||
|
|
||||||
|
RNS.log("LXM Router received outbound message: "+str(lxmessage))
|
||||||
|
|
||||||
|
while self.processing_outbound:
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.pending_outbound.append(lxmessage)
|
self.pending_outbound.append(lxmessage)
|
||||||
self.process_outbound()
|
self.process_outbound()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user