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

tinydtls_sock_dtls: use new mbox_avail() function

This commit is contained in:
Martine Lenders 2020-11-20 13:09:59 +01:00
parent 71224b4b1e
commit ef5e0344ef
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -461,7 +461,7 @@ static ssize_t _copy_buffer(sock_dtls_t *sock, sock_dtls_session_t *remote,
&remote->ep); &remote->ep);
if (sock->async_cb && if (sock->async_cb &&
/* is there a message in the sock's mbox? */ /* is there a message in the sock's mbox? */
cib_avail(&sock->mbox.cib)) { mbox_avail(&sock->mbox)) {
if (sock->buffer.data) { if (sock->buffer.data) {
sock->async_cb(sock, SOCK_ASYNC_MSG_RECV, sock->async_cb(sock, SOCK_ASYNC_MSG_RECV,
sock->async_cb_arg); sock->async_cb_arg);
@ -493,7 +493,7 @@ static ssize_t _complete_handshake(sock_dtls_t *sock,
if (sock->async_cb) { if (sock->async_cb) {
sock_async_flags_t flags = SOCK_ASYNC_CONN_RDY; sock_async_flags_t flags = SOCK_ASYNC_CONN_RDY;
if (cib_avail(&sock->mbox.cib)) { if (mbox_avail(&sock->mbox)) {
if (sock->buffer.data) { if (sock->buffer.data) {
flags |= SOCK_ASYNC_MSG_RECV; flags |= SOCK_ASYNC_MSG_RECV;
} }