From 4f5d385e526b4a7648c37eda0187d189449e281d Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Thu, 31 Mar 2022 17:42:09 +0100 Subject: [PATCH] Enable SNTP in zephyr example --- examples/zephyr/Makefile | 3 +++ examples/zephyr/http-server/src/main.c | 1 - mongoose.c | 2 +- src/net.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/examples/zephyr/Makefile b/examples/zephyr/Makefile index 01b06809..2311a7b3 100644 --- a/examples/zephyr/Makefile +++ b/examples/zephyr/Makefile @@ -10,3 +10,6 @@ build: flash: cd $(ZEPHYR_DIR) && west flash + +clean: + true diff --git a/examples/zephyr/http-server/src/main.c b/examples/zephyr/http-server/src/main.c index 4f0d1f8d..8d478d95 100644 --- a/examples/zephyr/http-server/src/main.c +++ b/examples/zephyr/http-server/src/main.c @@ -52,7 +52,6 @@ static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { static void timer_fn(void *arg) { struct mg_mgr *mgr = (struct mg_mgr *) arg; - return; if (s_sntp_conn == NULL) s_sntp_conn = mg_sntp_connect(mgr, NULL, sfn, NULL); if (s_boot_timestamp < 9999) mg_sntp_send(s_sntp_conn, time(NULL)); } diff --git a/mongoose.c b/mongoose.c index 71e678f5..4a7752c1 100644 --- a/mongoose.c +++ b/mongoose.c @@ -2799,7 +2799,7 @@ struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url, c->fn = fn; c->fn_data = fn_data; mg_call(c, MG_EV_OPEN, NULL); - MG_DEBUG(("%lu %s", c->id, url)); + MG_DEBUG(("%lu %s %p", c->id, url, c->fd)); } return c; } diff --git a/src/net.c b/src/net.c index a706f139..7bf4bdd1 100644 --- a/src/net.c +++ b/src/net.c @@ -198,7 +198,7 @@ struct mg_connection *mg_listen(struct mg_mgr *mgr, const char *url, c->fn = fn; c->fn_data = fn_data; mg_call(c, MG_EV_OPEN, NULL); - MG_DEBUG(("%lu %s", c->id, url)); + MG_DEBUG(("%lu %s %p", c->id, url, c->fd)); } return c; }