1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #16091 from maribu/tx_sync_frag_bugfix

sys/net/gnrc: fix logic bug in gnrc_tx_sync implementation
This commit is contained in:
Martine Lenders 2021-02-25 10:42:20 +01:00 committed by GitHub
commit f3871c06e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: