From b7411a7b100cf1e2c3c9452af29c352a88587f02 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 3 Sep 2019 15:44:30 +0200 Subject: [PATCH] [RIOT] coap_io_riot.c: Fix session iteration --- src/coap_io_riot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coap_io_riot.c b/src/coap_io_riot.c index 2a758869..4166455b 100644 --- a/src/coap_io_riot.c +++ b/src/coap_io_riot.c @@ -206,7 +206,7 @@ coap_run_once(coap_context_t *ctx, unsigned timeout_ms) { case GNRC_NETAPI_MSG_TYPE_RCV: { coap_log(LOG_DEBUG, "coap_run_once: GNRC_NETAPI_MSG_TYPE_RCV\n"); - coap_session_t *s; + coap_session_t *s, *rtmp; udp_hdr_t *udp_hdr = get_udp_header((gnrc_pktsnip_t *)msg.content.ptr); ipv6_hdr_t *ip6_hdr = gnrc_ipv6_get_header((gnrc_pktsnip_t *)msg.content.ptr); @@ -216,7 +216,7 @@ coap_run_once(coap_context_t *ctx, unsigned timeout_ms) { /* Traverse all sessions and set COAP_SOCKET_CAN_READ if the * received packet's destination address matches. */ - LL_FOREACH(ctx->sessions, s) { + SESSIONS_ITER(ctx->sessions, s, rtmp) { coap_log(LOG_DEBUG, "coap_run_once: check ctx->sessions %u == %u\n", ntohs(get_port(&s->addr_info.local)), ntohs(udp_hdr->dst_port.u16));