Fix freetext hang (#7781)

* Fixed freetext hangs by adding canned modules back to self-sourced packets and transition to SENDING_ACTIVE state

* Update meshmodule handling
This commit is contained in:
Ben Meadors
2025-08-29 12:09:22 -05:00
committed by GitHub
parent d3e3a91096
commit 4e03df5ea7
7 changed files with 12 additions and 22 deletions

View File

@@ -85,11 +85,8 @@ meshtastic_MeshPacket *MeshModule::allocErrorResponse(meshtastic_Routing_Error e
return r;
}
void MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src, const char *specificModule)
void MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src)
{
if (specificModule) {
LOG_DEBUG("Calling specific module: %s", specificModule);
}
// LOG_DEBUG("In call modules");
bool moduleFound = false;
@@ -103,15 +100,11 @@ void MeshModule::callModules(meshtastic_MeshPacket &mp, RxSource src, const char
// Was this message directed to us specifically? Will be false if we are sniffing someone elses packets
auto ourNodeNum = nodeDB->getNodeNum();
bool toUs = isBroadcast(mp.to) || isToUs(&mp);
bool fromUs = mp.from == ourNodeNum;
for (auto i = modules->begin(); i != modules->end(); ++i) {
auto &pi = **i;
// If specificModule is provided, only call that specific module
if (specificModule && (!pi.name || strcmp(pi.name, specificModule) != 0)) {
continue;
}
pi.currentRequest = ∓
/// We only call modules that are interested in the packet (and the message is destined to us or we are promiscious)