partial for #681: Never let stale nodeinfos/positions stay in xmit queue

This commit is contained in:
Kevin Hester
2021-02-11 17:39:53 +08:00
parent fdfe62edf0
commit 917090856f
11 changed files with 53 additions and 2 deletions

View File

@@ -124,6 +124,8 @@ void Router::sendAckNak(ErrorReason err, NodeNum to, PacketId idFrom)
sendLocal(p); // we sometimes send directly to the local node
}
ErrorCode Router::sendLocal(MeshPacket *p)
{
// No need to deliver externally if the destination is the local node
@@ -199,6 +201,13 @@ ErrorCode Router::send(MeshPacket *p)
} */
}
/** Attempt to cancel a previously sent packet. Returns true if a packet was found we could cancel */
bool Router::cancelSending(NodeNum from, PacketId id) {
return iface ? iface->cancelSending(from, id) : false;
}
/**
* Every (non duplicate) packet this node receives will be passed through this method. This allows subclasses to
* update routing tables etc... based on what we overhear (even for messages not destined to our node)