1
0
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:
Martine S. Lenders 2020-05-12 14:01:30 +02:00
parent fcd36f7b77
commit d66583b542
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -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(&reg->mbox.cib)) {
reg->async_cb.generic(reg, SOCK_ASYNC_MSG_RECV, reg->async_cb_arg);
}
#endif
#ifdef MODULE_FUZZING
prevpkt = pkt;
#endif