example/helloworld.c: Fix segment fault

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
main
Jianhui Zhao 2018-01-08 14:29:08 +08:00
parent f2eb8d55f2
commit 769b6d2dbd
3 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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