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

benpicco notifications at github.com
Wed May 27 16:50:38 CEST 2020


@benpicco commented on this pull request.



> +{
+    sock_dtls_t *sock = ctx;
+
+    if (flags & SOCK_ASYNC_MSG_RECV) {
+        sock_dtls_session_t remote;
+        void *data = NULL;
+        void *data_ctx = NULL;
+
+        ssize_t res = sock_udp_recv_buf(udp_sock, &data, &data_ctx, 0,
+                                        &remote.ep);
+        if (res <= 0) {
+            DEBUG("sock_dtls: error receiving UDP packet: %d\n", (int)res);
+            return;
+        }
+
+        if (sock->buf_ctx != NULL) {

Why the check for `sock->buf_ctx`?

-- 
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#pullrequestreview-419298288
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200527/7557b9ff/attachment.htm>


More information about the notifications mailing list