mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-12 08:19:39 +00:00
fix extra free
This commit is contained in:
parent
1656c8d0cb
commit
829e0b6e26
@ -247,10 +247,7 @@ void MeshService::sendToMesh(MeshPacket *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it
|
// Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it
|
||||||
if (router.sendLocal(p) != ERRNO_OK) {
|
router.sendLocal(p);
|
||||||
DEBUG_MSG("No radio was able to send packet, discarding...\n");
|
|
||||||
releaseToPool(p);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MeshService::sendNetworkPing(NodeNum dest, bool wantReplies)
|
void MeshService::sendNetworkPing(NodeNum dest, bool wantReplies)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
#include "MeshTypes.h"
|
#include "MeshTypes.h"
|
||||||
#include "OSTimer.h"
|
|
||||||
#include "mesh-pb-constants.h"
|
#include "mesh-pb-constants.h"
|
||||||
#include <configuration.h>
|
#include <configuration.h>
|
||||||
#include <pb_decode.h>
|
#include <pb_decode.h>
|
||||||
|
@ -48,6 +48,8 @@ class Router
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Works like send, but if we are sending to the local node, we directly put the message in the receive queue
|
* Works like send, but if we are sending to the local node, we directly put the message in the receive queue
|
||||||
|
*
|
||||||
|
* NOTE: This method will free the provided packet (even if we return an error code)
|
||||||
*/
|
*/
|
||||||
ErrorCode sendLocal(MeshPacket *p);
|
ErrorCode sendLocal(MeshPacket *p);
|
||||||
|
|
||||||
@ -63,6 +65,8 @@ class Router
|
|||||||
* Send a packet on a suitable interface. This routine will
|
* Send a packet on a suitable interface. This routine will
|
||||||
* later free() the packet to pool. This routine is not allowed to stall.
|
* later free() the packet to pool. This routine is not allowed to stall.
|
||||||
* If the txmit queue is full it might return an error
|
* If the txmit queue is full it might return an error
|
||||||
|
*
|
||||||
|
* NOTE: This method will free the provided packet (even if we return an error code)
|
||||||
*/
|
*/
|
||||||
virtual ErrorCode send(MeshPacket *p);
|
virtual ErrorCode send(MeshPacket *p);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user