mirror of
https://github.com/markqvist/LXMF.git
synced 2025-08-03 12:26:08 -04:00
Outbound procedure fix
This commit is contained in:
parent
b57960227d
commit
3d53ca0124
1 changed files with 11 additions and 4 deletions
15
LXMF/LXMF.py
15
LXMF/LXMF.py
|
@ -71,6 +71,12 @@ class LXMessage:
|
|||
PLAIN_PACKET_MDU = RNS.Packet.PLAIN_MDU
|
||||
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):
|
||||
if isinstance(destination, RNS.Destination) or destination == None:
|
||||
self.__destination = destination
|
||||
|
@ -406,13 +412,14 @@ class LXMRouter:
|
|||
self.__delivery_callback = callback
|
||||
|
||||
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:
|
||||
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.process_outbound()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue