diff mbox series

[22/23] mongoose: Fix url in mongoose start message

Message ID 20240612144010.470339-23-Michael.Glembotzki@iris-sensing.com
State Changes Requested
Headers show
Series Update Mongoose Version to 7.14 | expand

Commit Message

Michael Glembotzki June 12, 2024, 2:36 p.m. UTC
%I is not resolved. Replace the %I format specifier with %s. char *url is already there.

[start_mongoose] : Mongoose web server v7.14 with PID 1277 listening on %I:8080 and serving /var/www/swupdate

to

[start_mongoose] : Mongoose web server v7.14 with PID 1306 listening on 127.0.0.1:8080 and serving /var/www/swupdate

Signed-off-by: Michael Glembotzki <Michael.Glembotzki@iris-sensing.com>
---
 mongoose/mongoose_interface.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/mongoose/mongoose_interface.c b/mongoose/mongoose_interface.c
index fb052ad3..593bdcdc 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -819,7 +819,6 @@  int start_mongoose(const char *cfgfname, int argc, char *argv[])
 	struct mg_mgr mgr;
 	struct mg_connection *nc;
 	char *url = NULL;
-	char buf[50] = "\0";
 	int choice;
 
 #if MG_TLS
@@ -942,9 +941,8 @@  int start_mongoose(const char *cfgfname, int argc, char *argv[])
 	start_thread(broadcast_message_thread, NULL);
 	start_thread(broadcast_progress_thread, NULL);
 
-	mg_snprintf(buf, sizeof(buf), "%I", 4, &nc->loc.ip);
-	INFO("Mongoose web server v%s with PID %d listening on %s:%" PRIu16 " and serving %s",
-		MG_VERSION, getpid(), buf, mg_ntohs(nc->loc.port), s_http_server_opts.root_dir);
+	INFO("Mongoose web server v%s with PID %d listening on %s and serving %s",
+		MG_VERSION, getpid(), url, s_http_server_opts.root_dir);
 
 	while (s_signo == 0)
 		mg_mgr_poll(&mgr, 100);