aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-07-02 11:19:13 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-07-02 11:19:13 +0000
commit61b185460ac51e23f01c24a1ad0fa21f4e4f831d (patch)
tree6687cb2f736a3f5bcc7e69f2111e057868b1ab5b /src/transport/plugin_transport_http_server.c
parent57d9507ca85eb43efc132242a4c4248bee37315a (diff)
downloadgnunet-61b185460ac51e23f01c24a1ad0fa21f4e4f831d.tar.gz
gnunet-61b185460ac51e23f01c24a1ad0fa21f4e4f831d.zip
fix:
- empty string if no url given - print port as short
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c4
1 files 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)
2793 { 2793 {
2794 pos_url = pos + 1; 2794 pos_url = pos + 1;
2795 pos[0] = '\0'; 2795 pos[0] = '\0';
2796 GNUNET_asprintf (&plugin->external_hostname, "%s:%u/%s", tmp, port, pos_url); 2796 GNUNET_asprintf (&plugin->external_hostname, "%s:%u/%s", tmp, (uint16_t) port, (NULL == pos_url) ? "" : pos_url);
2797 } 2797 }
2798 else 2798 else
2799 GNUNET_asprintf (&plugin->external_hostname, "%s:%u", tmp, port); 2799 GNUNET_asprintf (&plugin->external_hostname, "%s:%u", tmp, (uint16_t) port);
2800 } 2800 }
2801 else 2801 else
2802 plugin->external_hostname = GNUNET_strdup (tmp); 2802 plugin->external_hostname = GNUNET_strdup (tmp);