diff mbox series

[20/21] mongoose: Fix url in mongoose start message

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

Commit Message

Michael Glembotzki June 15, 2024, 7:11 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 b47b9f55..f67b1089 100644
--- a/mongoose/mongoose_interface.c
+++ b/mongoose/mongoose_interface.c
@@ -815,7 +815,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
@@ -938,9 +937,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);