From 61b185460ac51e23f01c24a1ad0fa21f4e4f831d Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Tue, 2 Jul 2013 11:19:13 +0000 Subject: [PATCH] fix: - empty string if no url given - print port as short --- src/transport/plugin_transport_http_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index a332804ef..8f4b5bbeb 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c @@ -2793,10 +2793,10 @@ server_configure_plugin (struct HTTP_Server_Plugin *plugin) { pos_url = pos + 1; pos[0] = '\0'; - GNUNET_asprintf (&plugin->external_hostname, "%s:%u/%s", tmp, port, pos_url); + GNUNET_asprintf (&plugin->external_hostname, "%s:%u/%s", tmp, (uint16_t) port, (NULL == pos_url) ? "" : pos_url); } else - GNUNET_asprintf (&plugin->external_hostname, "%s:%u", tmp, port); + GNUNET_asprintf (&plugin->external_hostname, "%s:%u", tmp, (uint16_t) port); } else plugin->external_hostname = GNUNET_strdup (tmp); -- 2.25.1