diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-14 12:20:29 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-14 12:20:29 +0000 |
commit | 12e817dea1836b76b7f05c06d0c57ba43e938ef2 (patch) | |
tree | e44f255a56b0fa285f2c1949acb1595908956e4a /src/transport/plugin_transport_http.c | |
parent | 1fe79fd553e21a20206301c18568d30158c9dd46 (diff) | |
download | gnunet-12e817dea1836b76b7f05c06d0c57ba43e938ef2.tar.gz gnunet-12e817dea1836b76b7f05c06d0c57ba43e938ef2.zip |
fix: ipv6 IPs should be in []. strlen bad parens
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r-- | src/transport/plugin_transport_http.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 5c11f1f32..fb4627cfd 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -2905,7 +2905,9 @@ http_plugin_address_to_string (void *cls, const void *addr, size_t addrlen) | |||
2905 | return NULL; | 2905 | return NULL; |
2906 | } | 2906 | } |
2907 | 2907 | ||
2908 | res = GNUNET_snprintf (rbuf, sizeof (rbuf), "%s:%u", address, port); | 2908 | res = GNUNET_snprintf (rbuf, sizeof (rbuf), |
2909 | (addrlen == sizeof (struct IPv6HttpAddress)) ? "[%s]:%u" : "%s:%u", | ||
2910 | address, port); | ||
2909 | 2911 | ||
2910 | GNUNET_free (address); | 2912 | GNUNET_free (address); |
2911 | GNUNET_assert (res != 0); | 2913 | GNUNET_assert (res != 0); |