mirror of
https://github.com/markqvist/LXMF
synced 2026-11-27 13:52:19 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00ffbc09fe | ||
|
|
dca6cc2adc | ||
|
|
62038573f1 | ||
|
|
fa2d78c351 | ||
|
|
f18ce9ea99 |
No files matched your search
+5
-3
@@ -1360,14 +1360,16 @@ class LXMRouter:
|
|||||||
def sigint_handler(self, signal, frame):
|
def sigint_handler(self, signal, frame):
|
||||||
if not self.exit_handler_running:
|
if not self.exit_handler_running:
|
||||||
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
||||||
sys.exit(0)
|
self.exit_handler()
|
||||||
|
RNS.exit(0)
|
||||||
else:
|
else:
|
||||||
RNS.log("Received SIGINT, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
RNS.log("Received SIGINT, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||||
|
|
||||||
def sigterm_handler(self, signal, frame):
|
def sigterm_handler(self, signal, frame):
|
||||||
if not self.exit_handler_running:
|
if not self.exit_handler_running:
|
||||||
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
||||||
sys.exit(0)
|
self.exit_handler()
|
||||||
|
RNS.exit(0)
|
||||||
else:
|
else:
|
||||||
RNS.log("Received SIGTERM, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
RNS.log("Received SIGTERM, but exit handler is running, keeping process alive until storage persist is complete", RNS.LOG_WARNING)
|
||||||
|
|
||||||
@@ -2424,7 +2426,7 @@ class LXMRouter:
|
|||||||
selected_lxm.stamp = generated_stamp
|
selected_lxm.stamp = generated_stamp
|
||||||
selected_lxm.defer_stamp = False
|
selected_lxm.defer_stamp = False
|
||||||
selected_lxm.packed = None
|
selected_lxm.packed = None
|
||||||
selected_lxm.pack()
|
selected_lxm.pack(payload_updated=True)
|
||||||
stamp_generation_success = True
|
stamp_generation_success = True
|
||||||
RNS.log(f"Stamp generation completed for {selected_lxm}", RNS.LOG_DEBUG)
|
RNS.log(f"Stamp generation completed for {selected_lxm}", RNS.LOG_DEBUG)
|
||||||
else:
|
else:
|
||||||
|
|||||||
+2
-2
@@ -357,7 +357,7 @@ class LXMessage:
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def pack(self):
|
def pack(self, payload_updated=False):
|
||||||
if not self.packed:
|
if not self.packed:
|
||||||
if self.timestamp == None: self.timestamp = time.time()
|
if self.timestamp == None: self.timestamp = time.time()
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ class LXMessage:
|
|||||||
elif self.desired_method == LXMessage.PROPAGATED:
|
elif self.desired_method == LXMessage.PROPAGATED:
|
||||||
single_packet_content_limit = LXMessage.LINK_PACKET_MAX_CONTENT
|
single_packet_content_limit = LXMessage.LINK_PACKET_MAX_CONTENT
|
||||||
|
|
||||||
if self.__pn_encrypted_data == None:
|
if self.__pn_encrypted_data == None or payload_updated:
|
||||||
self.__pn_encrypted_data = self.__destination.encrypt(self.packed[LXMessage.DESTINATION_LENGTH:])
|
self.__pn_encrypted_data = self.__destination.encrypt(self.packed[LXMessage.DESTINATION_LENGTH:])
|
||||||
self.ratchet_id = self.__destination.latest_ratchet_id
|
self.ratchet_id = self.__destination.latest_ratchet_id
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ PN_VALIDATION_POOL_MIN_SIZE = 256
|
|||||||
|
|
||||||
active_jobs = {}
|
active_jobs = {}
|
||||||
|
|
||||||
|
if RNS.vendor.platformutils.is_linux(): multiprocessing.set_start_method("fork")
|
||||||
|
|
||||||
def stamp_workblock(material, expand_rounds=WORKBLOCK_EXPAND_ROUNDS):
|
def stamp_workblock(material, expand_rounds=WORKBLOCK_EXPAND_ROUNDS):
|
||||||
wb_st = time.time()
|
wb_st = time.time()
|
||||||
workblock = b""
|
workblock = b""
|
||||||
|
|||||||
+12
-4
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# MIT License
|
# Reticulum License
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2022 Mark Qvist / unsigned.io
|
# Copyright (c) 2020-2025 Mark Qvist
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -11,8 +11,16 @@
|
|||||||
# copies of the Software, and to permit persons to whom the Software is
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
# furnished to do so, subject to the following conditions:
|
# furnished to do so, subject to the following conditions:
|
||||||
#
|
#
|
||||||
# The above copyright notice and this permission notice shall be included in all
|
# - The Software shall not be used in any kind of system which includes amongst
|
||||||
# copies or substantial portions of the Software.
|
# its functions the ability to purposefully do harm to human beings.
|
||||||
|
#
|
||||||
|
# - The Software shall not be used, directly or indirectly, in the creation of
|
||||||
|
# an artificial intelligence, machine learning or language model training
|
||||||
|
# dataset, including but not limited to any use that contributes to the
|
||||||
|
# training or development of such a model or algorithm.
|
||||||
|
#
|
||||||
|
# - The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
#
|
#
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
__version__ = "0.9.0"
|
__version__ = "0.9.1"
|
||||||
Reference in new issue
Block a user