From 769b6d2dbdee45079b2568df28d3c60d379ab900 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Mon, 8 Jan 2018 14:29:08 +0800 Subject: [PATCH] example/helloworld.c: Fix segment fault Signed-off-by: Jianhui Zhao --- README.md | 2 +- README_ZH.md | 2 +- example/helloworld.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c6beab8..a9d4c5b 100755 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ int main(int argc, char **argv) if (!srv) goto done; - uh_log_debug("Listen on: *:%s", port); + uh_log_debug("Listen on: *:%d", port); #ifdef EXAMPLE_SSL #if (UHTTPD_SSL_SUPPORT) diff --git a/README_ZH.md b/README_ZH.md index e015a0f..14ad702 100755 --- a/README_ZH.md +++ b/README_ZH.md @@ -108,7 +108,7 @@ int main(int argc, char **argv) if (!srv) goto done; - uh_log_debug("Listen on: *:%s", port); + uh_log_debug("Listen on: *:%d", port); #ifdef EXAMPLE_SSL #if (UHTTPD_SSL_SUPPORT) diff --git a/example/helloworld.c b/example/helloworld.c index 79e0662..631a9d6 100755 --- a/example/helloworld.c +++ b/example/helloworld.c @@ -51,11 +51,11 @@ int main(int argc, char **argv) if (!srv) goto done; - uh_log_debug("Listen on: *:%s", port); + uh_log_debug("Listen on: *:%d", port); #ifdef EXAMPLE_SSL #if (UHTTPD_SSL_SUPPORT) - if (srv->ssl_init(srv, "/etc/wifidog/wifidog.key", "/etc/wifidog/wifidog.crt") < 0) + if (srv->ssl_init(srv, "server-key.pem", "server-cert.pem") < 0) goto done; #endif #endif