TSCH: remove pending rx packet from ringbuf only after processing it

This commit is contained in:
Simon Duquennoy 2017-06-26 19:33:53 +02:00
parent 8a71f8ac61
commit 17309e42fc

View File

@ -420,15 +420,15 @@ tsch_rx_process_pending()
packetbuf_set_attr(PACKETBUF_ATTR_CHANNEL, current_input->channel);
}
/* Remove input from ringbuf */
ringbufindex_get(&input_ringbuf);
if(is_data) {
/* Pass to upper layers */
packet_input();
} else if(is_eb) {
eb_input(current_input);
}
/* Remove input from ringbuf */
ringbufindex_get(&input_ringbuf);
}
}