Skip to content

Commit

Permalink
Merge pull request #16091 from maribu/tx_sync_frag_bugfix
Browse files Browse the repository at this point in the history
sys/net/gnrc: fix logic bug in gnrc_tx_sync implementation
  • Loading branch information
miri64 authored Feb 25, 2021
2 parents 7c71fb2 + 7cfedbf commit f3871c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sys/net/gnrc/network_layer/sixlowpan/frag/gnrc_sixlowpan_frag.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,16 @@ void gnrc_sixlowpan_frag_send(gnrc_pktsnip_t *pkt, void *ctx, unsigned page)
goto error;
}
fbuf->offset += res;
if (IS_USED(MODULE_GNRC_TX_SYNC) && tx_sync) {
/* re-attach tx_sync to allow releasing it at end
* of transmission, or transmission failure */
gnrc_pkt_append((pkt) ? pkt : fbuf->pkt, tx_sync);
}
if (!gnrc_sixlowpan_frag_fb_send(fbuf)) {
DEBUG("6lo frag: message queue full, can't issue next fragment "
"sending\n");
goto error;
}
if (IS_USED(MODULE_GNRC_TX_SYNC) && tx_sync) {
/* re-attach tx_sync to allow releasing it at end
* of transmission, or transmission failure */
gnrc_pkt_append((pkt) ? pkt : fbuf->pkt, tx_sync);
}
thread_yield();
return;
error:
Expand Down

0 comments on commit f3871c0

Please sign in to comment.