Disable automatic NodeInfo request when NodeDB is full (#5255)

This commit is contained in:
GUVWAF
2024-11-04 21:06:12 +01:00
committed by GitHub
parent 50dac38a1b
commit f3b698905d
3 changed files with 14 additions and 5 deletions

View File

@@ -86,9 +86,9 @@ int MeshService::handleFromRadio(const meshtastic_MeshPacket *mp)
LOG_DEBUG("Received telemetry response. Skip sending our NodeInfo"); // because this potentially a Repeater which will
// ignore our request for its NodeInfo
} else if (mp->which_payload_variant == meshtastic_MeshPacket_decoded_tag && !nodeDB->getMeshNode(mp->from)->has_user &&
nodeInfoModule && !isPreferredRebroadcaster) {
nodeInfoModule && !isPreferredRebroadcaster && !nodeDB->isFull()) {
if (airTime->isTxAllowedChannelUtil(true)) {
LOG_INFO("Heard new node on ch. %d, sending NodeInfo and asking for a response", mp->channel);
LOG_INFO("Heard new node on ch. %d, send NodeInfo and ask for response", mp->channel);
nodeInfoModule->sendOurNodeInfo(mp->from, true, mp->channel);
} else {
LOG_DEBUG("Skip sending NodeInfo > 25%% ch. util");
@@ -421,4 +421,4 @@ uint32_t MeshService::GetTimeSinceMeshPacket(const meshtastic_MeshPacket *mp)
delta = 0;
return delta;
}
}