From b29709f13841d2ab69a7167ad33f3e80bd120b0b Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Mon, 16 Feb 2015 13:34:39 +0100 Subject: [PATCH] Contiki: set port and size for local interface in coap_new_endpoint() FIXME: size field from coap_endpoint_t should be removed as only POSIX has different address sizes. --- coap_io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coap_io.c b/coap_io.c index 45b62866..3a0e8201 100644 --- a/coap_io.c +++ b/coap_io.c @@ -87,7 +87,9 @@ coap_new_endpoint(const coap_address_t *addr, int flags) { return NULL; } + coap_address_init(&ep->addr); uip_ipaddr_copy(&ep->addr.addr, &addr->addr); + ep->addr.port = addr->port; udp_bind((struct uip_udp_conn *)ep->handle.conn, addr->port); } return ep;