mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
gnrc_sock: re-issue MSG_RECV event if there are still received messages
... after `*_recv()` was called. This prevents a client from needing to call `*_recv()` in a loop.
This commit is contained in:
parent
fcd36f7b77
commit
d66583b542
@ -150,6 +150,11 @@ ssize_t gnrc_sock_recv(gnrc_sock_reg_t *reg, gnrc_pktsnip_t **pkt_out,
|
||||
}
|
||||
*pkt_out = pkt; /* set out parameter */
|
||||
|
||||
#if IS_ACTIVE(SOCK_HAS_ASYNC)
|
||||
if (reg->async_cb.generic && cib_avail(®->mbox.cib)) {
|
||||
reg->async_cb.generic(reg, SOCK_ASYNC_MSG_RECV, reg->async_cb_arg);
|
||||
}
|
||||
#endif
|
||||
#ifdef MODULE_FUZZING
|
||||
prevpkt = pkt;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user