Skip to content

Commit

Permalink
net.c: Fix broken client only build
Browse files Browse the repository at this point in the history
Comment out specific server code in coap_start().
  • Loading branch information
mrdeep1 authored and obgm committed Jun 17, 2022
1 parent 20f15a1 commit 6046dcb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -3286,8 +3286,6 @@ static int coap_started = 0;
void coap_startup(void) {
coap_tick_t now;
uint64_t us;
static coap_str_const_t well_known = { sizeof(".well-known/core")-1,
(const uint8_t *)".well-known/core" };

if (coap_started)
return;
Expand All @@ -3304,10 +3302,14 @@ void coap_startup(void) {
coap_prng_init((unsigned int)us);
coap_memory_init();
coap_dtls_startup();
#if COAP_SERVER_SUPPORT
static coap_str_const_t well_known = { sizeof(".well-known/core")-1,
(const uint8_t *)".well-known/core" };
memset(&resource_uri_wellknown, 0, sizeof(resource_uri_wellknown));
resource_uri_wellknown.handler[COAP_REQUEST_GET-1] = hnd_get_wellknown;
resource_uri_wellknown.flags = COAP_RESOURCE_FLAGS_HAS_MCAST_SUPPORT;
resource_uri_wellknown.uri_path = &well_known;
#endif /* COAP_SERVER_SUPPORT */
}

void coap_cleanup(void) {
Expand Down

0 comments on commit 6046dcb

Please sign in to comment.