Drop packet if there are not enough free buffers to perform fragmentation

This commit is contained in:
Laurent Deru 2013-09-02 16:19:08 +02:00
parent 8b72ab49c0
commit 68b9412776
5 changed files with 34 additions and 1 deletions

View file

@ -307,6 +307,16 @@ queuebuf_init(void)
#endif /* QUEUEBUF_STATS */
}
/*---------------------------------------------------------------------------*/
int
queuebuf_numfree(void)
{
if(packetbuf_is_reference()) {
return memb_numfree(&refbufmem);
} else {
return memb_numfree(&bufmem);
}
}
/*---------------------------------------------------------------------------*/
#if QUEUEBUF_DEBUG
struct queuebuf *
queuebuf_new_from_packetbuf_debug(const char *file, int line)