aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-09-14 12:20:29 +0000
committerChristian Grothoff <christian@grothoff.org>2011-09-14 12:20:29 +0000
commit12e817dea1836b76b7f05c06d0c57ba43e938ef2 (patch)
treee44f255a56b0fa285f2c1949acb1595908956e4a /src/transport/plugin_transport_udp.c
parent1fe79fd553e21a20206301c18568d30158c9dd46 (diff)
downloadgnunet-12e817dea1836b76b7f05c06d0c57ba43e938ef2.tar.gz
gnunet-12e817dea1836b76b7f05c06d0c57ba43e938ef2.zip
fix: ipv6 IPs should be in []. strlen bad parens
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 3a69273c5..752dd6f3d 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1065,7 +1065,8 @@ udp_address_to_string (void *cls, const void *addr, size_t addrlen)
1065 return NULL; 1065 return NULL;
1066 } 1066 }
1067 inet_ntop (af, sb, buf, INET6_ADDRSTRLEN); 1067 inet_ntop (af, sb, buf, INET6_ADDRSTRLEN);
1068 GNUNET_snprintf (rbuf, sizeof (rbuf), "%s:%u", buf, port); 1068 GNUNET_snprintf (rbuf, sizeof (rbuf), (af == AF_INET6) ? "[%s]:%u" : "%s:%u",
1069 buf, port);
1069 return rbuf; 1070 return rbuf;
1070} 1071}
1071 1072