mirror of
https://github.com/SebastianObi/LXMF-Tools.git
synced 2025-12-22 08:27:06 +00:00
Fixed identity not known bug
This commit is contained in:
@@ -388,6 +388,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -382,6 +382,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -380,6 +380,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -378,6 +378,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -389,6 +389,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -376,6 +376,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -375,6 +375,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -385,6 +385,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -319,6 +319,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
@@ -375,6 +375,15 @@ class LXMFPeer:
|
|||||||
method = self.method
|
method = self.method
|
||||||
|
|
||||||
destination_identity = RNS.Identity.recall(destination)
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
|
if not destination_identity:
|
||||||
|
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
|
||||||
|
RNS.Transport.request_path(destination)
|
||||||
|
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
|
||||||
|
while not RNS.Transport.has_path(destination):
|
||||||
|
if time.time() > pr_time+30:
|
||||||
|
log("LXMF - Path request timeout", LOG_DEBUG)
|
||||||
|
return None
|
||||||
|
destination_identity = RNS.Identity.recall(destination)
|
||||||
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
|
||||||
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user