[riot-notifications] [RIOT-OS/RIOT] tinydtls: add `sock_async` support for `sock_dtls` (#12907)

Martine Lenders notifications at github.com
Wed May 27 16:57:08 CEST 2020


@miri64 commented on this pull request.



> @@ -376,6 +436,26 @@ static ssize_t _copy_buffer(sock_dtls_t *sock, void *data, size_t max_len)
     if (buflen > max_len) {
         return -ENOBUFS;
     }
+#if SOCK_HAS_ASYNC
+    if (sock->buf_ctx != NULL) {
+        memcpy(data, buf, sock->buflen);
+        _check_more_chunks(sock->udp_sock, (void **)&buf, &sock->buf_ctx,
+                           &remote->ep);
+        if (sock->async_cb && cib_avail(&sock->mbox.cib)) {

To check if there is actually another message in the mbox?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12907#discussion_r431203610
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200527/9cf07561/attachment.htm>


More information about the notifications mailing list