example/helloworld.c: Fix segment fault

Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
This commit is contained in:
Jianhui Zhao committed 2018-01-08 14:29:08 +08:00
1 parent f2eb8d55f2
commit 769b6d2dbd
3 files changed
+4 -4

No files matched your search

+1 -1
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)
+1 -1
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)
+2 -2
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