mirror of
https://github.com/markqvist/LXMF
synced 2026-11-23 07:20:36 +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):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGINT, shutting down now!", RNS.LOG_WARNING)
|
||||
sys.exit(0)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
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):
|
||||
if not self.exit_handler_running:
|
||||
RNS.log("Received SIGTERM, shutting down now!", RNS.LOG_WARNING)
|
||||
sys.exit(0)
|
||||
self.exit_handler()
|
||||
RNS.exit(0)
|
||||
else:
|
||||
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.defer_stamp = False
|
||||
selected_lxm.packed = None
|
||||
selected_lxm.pack()
|
||||
selected_lxm.pack(payload_updated=True)
|
||||
stamp_generation_success = True
|
||||
RNS.log(f"Stamp generation completed for {selected_lxm}", RNS.LOG_DEBUG)
|
||||
else:
|
||||
|
||||
+2
-2
@@ -357,7 +357,7 @@ class LXMessage:
|
||||
else:
|
||||
return None
|
||||
|
||||
def pack(self):
|
||||
def pack(self, payload_updated=False):
|
||||
if not self.packed:
|
||||
if self.timestamp == None: self.timestamp = time.time()
|
||||
|
||||
@@ -431,7 +431,7 @@ class LXMessage:
|
||||
elif self.desired_method == LXMessage.PROPAGATED:
|
||||
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.ratchet_id = self.__destination.latest_ratchet_id
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ PN_VALIDATION_POOL_MIN_SIZE = 256
|
||||
|
||||
active_jobs = {}
|
||||
|
||||
if RNS.vendor.platformutils.is_linux(): multiprocessing.set_start_method("fork")
|
||||
|
||||
def stamp_workblock(material, expand_rounds=WORKBLOCK_EXPAND_ROUNDS):
|
||||
wb_st = time.time()
|
||||
workblock = b""
|
||||
|
||||
+12
-4
@@ -1,8 +1,8 @@
|
||||
#!/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
|
||||
# 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
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
# - The Software shall not be used in any kind of system which includes amongst
|
||||
# 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
|
||||
# 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