coap_io_process_with_fds_lkd: use local fd_set to avoid conflicts when called in parallel for the same context

This commit is contained in:
Mario Kicherer authored and Jon Shallow committed 2025-12-19 14:30:50 +00:00
1 parent c5eed9b59b
commit 43bb86df92
2 files changed
+49 -34

No files matched your search

+2
View File
@@ -198,8 +198,10 @@ struct coap_context_t {
int eptimerfd; /**< Internal FD for timeout */
#else /* ! COAP_EPOLL_SUPPORT */
#if !defined(RIOT_VERSION) && !defined(WITH_CONTIKI)
#if COAP_CONSTRAINED_STACK
fd_set readfds, writefds, exceptfds; /**< Used for select call
in coap_io_process_with_fds_lkd() */
#endif /* COAP_CONSTRAINED_STACK */
coap_socket_t *sockets[64]; /**< Track different socket information
in coap_io_process_with_fds_lkd() */
unsigned int num_sockets; /**< Number of sockets being tracked */