Handle repeated packet after potentially canceling previous Tx (#5330)

* Revert "Fix sending duplicate packets to PhoneAPI/MQTT (#5315)"

This reverts commit 40bc04b521.

* Handle repeated packet after potentially canceling previous Tx
This commit is contained in:
GUVWAF
2024-11-12 22:23:32 +01:00
committed by GitHub
parent 2ec3958cd8
commit e866734a25
8 changed files with 47 additions and 48 deletions

View File

@@ -28,14 +28,8 @@ bool RoutingModule::handleReceivedProtobuf(const meshtastic_MeshPacket &mp, mesh
// FIXME - move this to a non promsicious PhoneAPI module?
// Note: we are careful not to send back packets that started with the phone back to the phone
if ((isBroadcast(mp.to) || isToUs(&mp)) && (mp.from != 0)) {
// Check if it wasn't already seen, then we don't need to handle it again
bool isRepeated = false;
bool *rptr = &isRepeated;
router->wasSeenRecently(&mp, false, rptr);
if (!isRepeated) {
printPacket("Delivering rx packet", &mp);
service->handleFromRadio(&mp);
}
printPacket("Delivering rx packet", &mp);
service->handleFromRadio(&mp);
}
return false; // Let others look at this message also if they want