mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 06:12:43 +01:00
Merge pull request #21105 from maribu/pkg/tinydtls/compilation-with-async-but-without-async-event
pkg/tinydtls: fix compilation with sock_async
This commit is contained in:
commit
95fe972aee
@ -1063,13 +1063,13 @@ void sock_dtls_set_cb(sock_dtls_t *sock, sock_dtls_cb_t cb, void *cb_arg)
|
|||||||
{
|
{
|
||||||
sock->async_cb = cb;
|
sock->async_cb = cb;
|
||||||
sock->async_cb_arg = cb_arg;
|
sock->async_cb_arg = cb_arg;
|
||||||
if (IS_USED(MODULE_SOCK_ASYNC_EVENT)) {
|
#if MODULE_SOCK_ASYNC_EVENT
|
||||||
sock_async_ctx_t *ctx = sock_dtls_get_async_ctx(sock);
|
sock_async_ctx_t *ctx = sock_dtls_get_async_ctx(sock);
|
||||||
if (ctx->queue) {
|
if (ctx->queue) {
|
||||||
sock_udp_event_init(sock->udp_sock, ctx->queue, _udp_cb, sock);
|
sock_udp_event_init(sock->udp_sock, ctx->queue, _udp_cb, sock);
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
sock_udp_set_cb(sock->udp_sock, _udp_cb, sock);
|
sock_udp_set_cb(sock->udp_sock, _udp_cb, sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user