[riot-notifications] [RIOT-OS/RIOT] net/gcoap: support DTLS (#15549)

János Brodbeck notifications at github.com
Wed May 26 14:06:12 CEST 2021


@janosbrodbeck commented on this pull request.



> +        sock_udp_ep_t ep;
+        sock_dtls_session_get_udp_ep(&socket.ctx_dtls_session, &ep);
+        _process_coap_pdu(&socket, &ep,  _listen_buf, res);
+    }
+}
+#endif
+
+#if IS_ACTIVE(CONFIG_GCOAP_ENABLE_DTLS)
+/* Timeout function to free up a session when too many session slots are occupied */
+static void _dtls_free_up_session(void *arg) {
+    (void)arg;
+    sock_dtls_session_t session;
+
+    uint8_t minimum_free = CONFIG_GCOAP_DTLS_MINIMUM_AVAILABLE_SESSIONS;
+    if (dsm_get_num_available_slots() < minimum_free) {
+        if(dsm_get_oldest_used_session(&_sock_dtls, &session) != -1) {

You mean: Let `dsm` destroy the session instead of getting it and then destroy?

-- 
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/15549#discussion_r639661104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210526/c6086894/attachment.htm>


More information about the notifications mailing list