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.
This commit is contained in:
chrysn committed 2015-01-16 08:45:28 +01:00
1 parent 2680f038b0
commit 4cadf731a2
1 file changed
+3
+3
View File
@@ -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;
}