diff --git a/examples/lwip/Makefile b/examples/lwip/Makefile index b3e4a484..a0ccb3eb 100644 --- a/examples/lwip/Makefile +++ b/examples/lwip/Makefile @@ -7,7 +7,7 @@ # This file is part of the CoAP C library libcoap. Please see README and # COPYING for terms of use. -libcoap_dir = ../../ +libcoap_dir = ../.. LIBCOAP_API_VERSION = $(shell if [ -f $(libcoap_dir)/configure.ac ]; then \ sed -ne 's/^LIBCOAP_API_VERSION=\([0-9]\+\).*$$/\1/p' $(libcoap_dir)/configure.ac; \ diff --git a/src/coap_io.c b/src/coap_io.c index 185e8f34..849b3c11 100644 --- a/src/coap_io.c +++ b/src/coap_io.c @@ -398,7 +398,9 @@ void coap_socket_close(coap_socket_t *sock) { coap_socket_strerror(), errno); } } +#if COAP_SERVER_SUPPORT sock->endpoint = NULL; +#endif /* COAP_SERVER_SUPPORT */ sock->session = NULL; #endif /* COAP_EPOLL_SUPPORT */ coap_closesocket(sock->fd); diff --git a/src/net.c b/src/net.c index 62bfe2d5..a191139d 100644 --- a/src/net.c +++ b/src/net.c @@ -1088,7 +1088,9 @@ coap_client_delay_first(coap_session_t *session) session->delay_recursive = 0; coap_session_release(session); } -#endif /* COAP_CLIENT_SUPPORT */ +#else /* ! COAP_CLIENT_SUPPORT */ + (void)session; +#endif /* ! COAP_CLIENT_SUPPORT */ return 1; }