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

Aiman Ismail notifications at github.com
Mon May 25 20:38:32 CEST 2020

Okay now I found the real issue:
1. `_event` puts `DTLS_EVENT_CONNECT` message in mbox in `session_init()`, but nobody took it out from mbox. So we got the `DTLS_EVENT_CONNECT` instead of `DTLS_EVENT_CONNECTED` when doing `mbox_try_get()` in `sock_dtls_recv()`. This causes the if condition to return `SOCK_DTLS_HANDSHAKE` cannot be entered.
2. The `remote` is not filled in by `sock_dtls_recv()` as when received `DTLS_EVENT_CONNECTED`. In `_event`, we can pass in the session together with the message through the mbox and use this to fill in the remote.

With the above issues fixed, I managed to get it to send: [patch](https://gist.github.com/pokgak/416ee56cb306e1c63739f1dfc3789d1a) but server now have FAILED ASSERTION when echoing the data.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200525/7a095998/attachment-0001.htm>

More information about the notifications mailing list