Skip to content

Commit

Permalink
gnrc_sixlowpan_frag: include VRB in normal GC
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Aug 7, 2019
1 parent 6e76b4a commit c617ee1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sys/net/gnrc/network_layer/sixlowpan/frag/rbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit c617ee1

Please sign in to comment.