gnrc_sixlowpan_frag: include VRB in normal GC

This commit is contained in:
Martine Lenders 2019-02-26 11:19:04 +01:00 committed by Martine S. Lenders
parent 2cd46e57ab
commit 1f1ff16e3c

View File

@ -21,6 +21,9 @@
#include "net/gnrc.h"
#include "net/gnrc/sixlowpan.h"
#include "net/gnrc/sixlowpan/frag.h"
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG_VRB
#include "net/gnrc/sixlowpan/frag/vrb.h"
#endif /* MODULE_GNRC_SIXLOWPAN_FRAG_VRB */
#include "net/sixlowpan.h"
#include "thread.h"
#include "xtimer.h"
@ -264,7 +267,7 @@ void rbuf_gc(void)
for (i = 0; i < RBUF_SIZE; i++) {
/* since pkt occupies pktbuf, aggressivly collect garbage */
if ((rbuf[i].pkt != NULL) &&
if (!rbuf_entry_empty(&rbuf[i]) &&
((now_usec - rbuf[i].super.arrival) > RBUF_TIMEOUT)) {
DEBUG("6lo rfrag: entry (%s, ",
gnrc_netif_addr_to_str(rbuf[i].super.src,
@ -280,6 +283,9 @@ void rbuf_gc(void)
rbuf_rm(&(rbuf[i]));
}
}
#ifdef MODULE_GNRC_SIXLOWPAN_FRAG_VRB
gnrc_sixlowpan_frag_vrb_gc();
#endif
}
static inline void _set_rbuf_timeout(void)