Misc fixes

This commit is contained in:
Jonathan Bennett
2025-12-21 19:49:00 -06:00
parent 6e83a9a0b3
commit ffdb3bc393
2 changed files with 3 additions and 6 deletions

View File

@@ -688,11 +688,6 @@ bool StoreForwardPlusPlusModule::sendFromScratch(uint8_t *root_hash)
LOG_WARN("No messages in scratch to forward");
return false;
}
uint8_t _root_hash[32] = {0};
// if (!getRootFromChannelHash(_channel_hash, _root_hash)) {
// LOG_ERROR("Error getting root hash");
// return false;
// }
meshtastic_StoreForwardPlusPlus storeforward = meshtastic_StoreForwardPlusPlus_init_zero;
storeforward.sfpp_message_type = meshtastic_StoreForwardPlusPlus_SFPP_message_type_LINK_PROVIDE;
@@ -712,7 +707,7 @@ bool StoreForwardPlusPlusModule::sendFromScratch(uint8_t *root_hash)
storeforward.encapsulated_rxtime = sqlite3_column_int(fromScratchStmt, 5);
storeforward.root_hash.size = 32;
memcpy(storeforward.root_hash.bytes, _root_hash, 32);
memcpy(storeforward.root_hash.bytes, root_hash, 32);
sqlite3_reset(fromScratchStmt);

View File

@@ -1,4 +1,5 @@
#pragma once
#if __has_include("sqlite3.h")
#include "Channels.h"
#include "ProtobufModule.h"
#include "Router.h"
@@ -210,3 +211,4 @@ class StoreForwardPlusPlusModule : public ProtobufModule<meshtastic_StoreForward
uint32_t rebroadcastTimeout = 3600; // Messages older than this (in seconds) will not be rebroadcast
};
#endif