don't leak messages if they are handled locally

1.2-legacy
geeksville 2020-05-02 19:53:13 -07:00
rodzic 07b4eea037
commit ad2f639195
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -266,8 +266,10 @@ void MeshService::sendToMesh(MeshPacket *p)
}
// If the phone sent a packet just to us, don't send it out into the network
if (p->to == nodeDB.getNodeNum())
if (p->to == nodeDB.getNodeNum()) {
DEBUG_MSG("Dropping locally processed message\n");
releaseToPool(p);
}
else {
// Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it
if (router.send(p) != ERRNO_OK) {