1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

ng_sixlowpan: use ng_pktbuf_remove_snip()

This commit is contained in:
Martine Lenders 2015-04-28 14:51:06 +02:00 committed by Martine Lenders
parent 4f5995a4cf
commit 450abe6154

View File

@ -78,8 +78,14 @@ void _receive(ng_pktsnip_t *pkt)
/* packet is uncompressed: just mark and remove the dispatch */
sixlowpan = ng_pktbuf_add(payload, payload->data, sizeof(uint8_t),
NG_NETTYPE_SIXLOWPAN);
LL_DELETE(pkt, sixlowpan);
ng_pktbuf_release(sixlowpan);
if (sixlowpan == NULL) {
DEBUG("6lo: can not mark 6LoWPAN dispatch\n");
ng_pktbuf_release(pkt);
return;
}
pkt = ng_pktbuf_remove_snip(pkt, sixlowpan);
}
#ifdef MODULE_NG_SIXLOWPAN_FRAG
else if (ng_sixlowpan_frag_is((ng_sixlowpan_frag_t *)dispatch)) {