mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-26 07:20:18 +00:00
Merge pull request #189 from Erethon/master
Fix bug where announce_identity could be undefined
This commit is contained in:
commit
3b2fbe02c6
@ -1427,12 +1427,12 @@ class Transport:
|
|||||||
# Check that the announced destination matches
|
# Check that the announced destination matches
|
||||||
# the handlers aspect filter
|
# the handlers aspect filter
|
||||||
execute_callback = False
|
execute_callback = False
|
||||||
|
announce_identity = RNS.Identity.recall(packet.destination_hash)
|
||||||
if handler.aspect_filter == None:
|
if handler.aspect_filter == None:
|
||||||
# If the handlers aspect filter is set to
|
# If the handlers aspect filter is set to
|
||||||
# None, we execute the callback in all cases
|
# None, we execute the callback in all cases
|
||||||
execute_callback = True
|
execute_callback = True
|
||||||
else:
|
else:
|
||||||
announce_identity = RNS.Identity.recall(packet.destination_hash)
|
|
||||||
handler_expected_hash = RNS.Destination.hash_from_name_and_identity(handler.aspect_filter, announce_identity)
|
handler_expected_hash = RNS.Destination.hash_from_name_and_identity(handler.aspect_filter, announce_identity)
|
||||||
if packet.destination_hash == handler_expected_hash:
|
if packet.destination_hash == handler_expected_hash:
|
||||||
execute_callback = True
|
execute_callback = True
|
||||||
|
Loading…
Reference in New Issue
Block a user