Skip to content

Commit

Permalink
Merge branch 'wismeshtap_4.5.12' of github.com:DanielCao0/firmware in…
Browse files Browse the repository at this point in the history
…to wismeshtap_4.5.12
  • Loading branch information
DanielCao0 committed Nov 9, 2024
2 parents 6159f94 + 86ba369 commit 54d8907
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion protobufs
6 changes: 2 additions & 4 deletions src/mesh/NodeDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +1219,7 @@ meshtastic_NodeInfoLite *NodeDB::getOrCreateMeshNode(NodeNum n)

if (!lite) {
if (isFull()) {
if (screen)
screen->print("Warn: node database full!\nErasing oldest entry\n");
LOG_WARN("Node database full with %i nodes and %i bytes free! Erasing oldest entry", numMeshNodes,
LOG_INFO("Node database full with %i nodes and %i bytes free. Erasing oldest entry", numMeshNodes,
memGet.getFreeHeap());
// look for oldest node and erase it
uint32_t oldest = UINT32_MAX;
Expand Down Expand Up @@ -1285,4 +1283,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co
LOG_ERROR("A critical failure occurred, portduino is exiting");
exit(2);
#endif
}
}
5 changes: 3 additions & 2 deletions src/mesh/Router.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,10 @@ ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)
handleReceived(p, src);
}

if (!p->channel && !p->pki_encrypted) { // don't override if a channel was requested
// don't override if a channel was requested and no need to set it when PKI is enforced
if (!p->channel && !p->pki_encrypted) {
meshtastic_NodeInfoLite *node = nodeDB->getMeshNode(p->to);
if (node && node->user.public_key.size == 0) {
if (node) {
p->channel = node->channel;
LOG_DEBUG("localSend to channel %d", p->channel);
}
Expand Down

0 comments on commit 54d8907

Please sign in to comment.