mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-05 05:40:14 +00:00
Fixed path request response on system-local destinations when Transport is disabled
This commit is contained in:
parent
876d60b68a
commit
481d43ad72
@ -90,10 +90,9 @@ class Transport:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Could not load packet hashlist from disk, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Could not load packet hashlist from disk, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
if RNS.Reticulum.transport_enabled():
|
# Create transport-specific destinations
|
||||||
# Create transport-specific destinations
|
path_request_destination = RNS.Destination(None, RNS.Destination.IN, RNS.Destination.PLAIN, Transport.APP_NAME, "path", "request")
|
||||||
path_request_destination = RNS.Destination(None, RNS.Destination.IN, RNS.Destination.PLAIN, Transport.APP_NAME, "path", "request")
|
path_request_destination.packet_callback(Transport.pathRequestHandler)
|
||||||
path_request_destination.packet_callback(Transport.pathRequestHandler)
|
|
||||||
|
|
||||||
thread = threading.Thread(target=Transport.jobloop)
|
thread = threading.Thread(target=Transport.jobloop)
|
||||||
thread.setDaemon(True)
|
thread.setDaemon(True)
|
||||||
@ -680,7 +679,7 @@ class Transport:
|
|||||||
RNS.log("Destination is local to this system, announcing", RNS.LOG_DEBUG)
|
RNS.log("Destination is local to this system, announcing", RNS.LOG_DEBUG)
|
||||||
local_destination.announce(path_response=True)
|
local_destination.announce(path_response=True)
|
||||||
|
|
||||||
elif destination_hash in Transport.destination_table:
|
elif RNS.Reticulum.transport_enabled() and destination_hash in Transport.destination_table:
|
||||||
RNS.log("Path found, inserting announce for transmission", RNS.LOG_DEBUG)
|
RNS.log("Path found, inserting announce for transmission", RNS.LOG_DEBUG)
|
||||||
packet = Transport.destination_table[destination_hash][6]
|
packet = Transport.destination_table[destination_hash][6]
|
||||||
received_from = Transport.destination_table[destination_hash][5]
|
received_from = Transport.destination_table[destination_hash][5]
|
||||||
|
Loading…
Reference in New Issue
Block a user