sforkowany z mirror/meshtastic-firmware
better debug output
rodzic
1f2dc82035
commit
c15204fed1
|
@ -104,10 +104,10 @@ void MeshPlugin::callPlugins(const MeshPacket &mp)
|
|||
assert(!currentReply);
|
||||
|
||||
if (mp.decoded.want_response) {
|
||||
DEBUG_MSG("packet on wrong channel, returning error\n");
|
||||
printPacket("packet on wrong channel, returning error", &mp);
|
||||
currentReply = pi.allocErrorResponse(Routing_Error_NOT_AUTHORIZED, &mp);
|
||||
} else
|
||||
DEBUG_MSG("packet on wrong channel, but client didn't want response\n");
|
||||
printPacket("packet on wrong channel, but can't respond", &mp);
|
||||
} else {
|
||||
|
||||
bool handled = pi.handleReceived(mp);
|
||||
|
@ -151,7 +151,7 @@ void MeshPlugin::callPlugins(const MeshPacket &mp)
|
|||
currentReply = NULL;
|
||||
} else if(mp.from != ourNodeNum) {
|
||||
// Note: if the message started with the local node we don't want to send a no response reply
|
||||
|
||||
|
||||
// No one wanted to reply to this requst, tell the requster that happened
|
||||
DEBUG_MSG("No one responded, send a nak\n");
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ bool PacketHistory::wasSeenRecently(const MeshPacket *p, bool withUpdate)
|
|||
recentPackets.erase(recentPackets.begin() + i); // delete old record
|
||||
} else {
|
||||
if (r.id == p->id && r.sender == getFrom(p)) {
|
||||
DEBUG_MSG("Found existing packet record for fr=0x%x,to=0x%x,id=%d\n", p->from, p->to, p->id);
|
||||
DEBUG_MSG("Found existing packet record for fr=0x%x,to=0x%x,id=0x%x\n", p->from, p->to, p->id);
|
||||
|
||||
// Update the time on this record to now
|
||||
if (withUpdate)
|
||||
|
|
|
@ -49,6 +49,9 @@ bool ReliableRouter::shouldFilterReceived(const MeshPacket *p)
|
|||
|
||||
stopRetransmission(key);
|
||||
}
|
||||
else {
|
||||
DEBUG_MSG("Possible bug? didn't find pending packet");
|
||||
}
|
||||
}
|
||||
|
||||
return FloodingRouter::shouldFilterReceived(p);
|
||||
|
|
Ładowanie…
Reference in New Issue