From 4cadf731a20d165f4cf45a801c0eb3ee17199e70 Mon Sep 17 00:00:00 2001 From: chrysn Date: Fri, 16 Jan 2015 08:45:28 +0100 Subject: [PATCH] lwip port: store context in endpoint this is required for the packages incoming via an endpoint to find their way back to the context. the relationship between context and endpoint is still to be documented. --- net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net.c b/net.c index b2aefcd2..1d0c28ea 100644 --- a/net.c +++ b/net.c @@ -336,6 +336,9 @@ coap_new_context( coap_register_option(c, COAP_OPTION_BLOCK1); c->endpoint = coap_new_endpoint(listen_addr, COAP_ENDPOINT_NOSEC); +#ifdef WITH_LWIP + c->endpoint->context = c; +#endif if (c->endpoint == NULL) { goto onerror; }