From 5e7d73027401f8d82ff7610e0a334b6e44aa5ca1 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 4 Sep 2024 17:06:05 +0300 Subject: [PATCH] samples: net: http_server: Create service binding to all addresses Allow user to listen all IP addresses instead of hard coded one. Signed-off-by: Jukka Rissanen --- samples/net/sockets/http_server/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/net/sockets/http_server/src/main.c b/samples/net/sockets/http_server/src/main.c index e297563e756..c95e846e5a8 100644 --- a/samples/net/sockets/http_server/src/main.c +++ b/samples/net/sockets/http_server/src/main.c @@ -265,7 +265,7 @@ struct http_resource_detail_websocket ws_netstats_resource_detail = { #if defined(CONFIG_NET_SAMPLE_HTTP_SERVICE) static uint16_t test_http_service_port = CONFIG_NET_SAMPLE_HTTP_SERVER_SERVICE_PORT; -HTTP_SERVICE_DEFINE(test_http_service, CONFIG_NET_CONFIG_MY_IPV4_ADDR, &test_http_service_port, 1, +HTTP_SERVICE_DEFINE(test_http_service, NULL, &test_http_service_port, 1, 10, NULL); HTTP_RESOURCE_DEFINE(index_html_gz_resource, test_http_service, "/", @@ -298,7 +298,7 @@ static const sec_tag_t sec_tag_list_verify_none[] = { }; static uint16_t test_https_service_port = CONFIG_NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT; -HTTPS_SERVICE_DEFINE(test_https_service, CONFIG_NET_CONFIG_MY_IPV4_ADDR, +HTTPS_SERVICE_DEFINE(test_https_service, NULL, &test_https_service_port, 1, 10, NULL, sec_tag_list_verify_none, sizeof(sec_tag_list_verify_none));