aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_udp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-06-01 10:20:00 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-06-01 10:20:00 +0000
commitd526b6e30cc7c6c06fd352e0e5fcc47bea52f39c (patch)
tree4e30415f5235528c50d3776f58811dbf5c90cc3a /src/transport/plugin_transport_udp.c
parentd13364c4eadf42dcb1e818df5f83fa51b335a436 (diff)
downloadgnunet-d526b6e30cc7c6c06fd352e0e5fcc47bea52f39c.tar.gz
gnunet-d526b6e30cc7c6c06fd352e0e5fcc47bea52f39c.zip
this code made no sense in this context
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r--src/transport/plugin_transport_udp.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 8e6deb037..bb814a996 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -1903,12 +1903,11 @@ udp_check_address (void *cls,
1903 size_t addrlen) 1903 size_t addrlen)
1904{ 1904{
1905 struct Plugin *plugin = cls; 1905 struct Plugin *plugin = cls;
1906 char buf[INET6_ADDRSTRLEN]; 1906
1907 const void *sb; 1907 const void *sb;
1908 struct in_addr a4; 1908 struct in_addr a4;
1909 struct in6_addr a6; 1909 struct in6_addr a6;
1910 int af; 1910 int af;
1911 uint16_t port;
1912 struct IPv4UdpAddress *v4; 1911 struct IPv4UdpAddress *v4;
1913 struct IPv6UdpAddress *v6; 1912 struct IPv6UdpAddress *v6;
1914 1913
@@ -1930,7 +1929,6 @@ udp_check_address (void *cls,
1930 return GNUNET_SYSERR; 1929 return GNUNET_SYSERR;
1931 1930
1932 af = AF_INET; 1931 af = AF_INET;
1933 port = ntohs (v4->u_port);
1934 memcpy (&a4, &v4->ipv4_addr, sizeof (a4)); 1932 memcpy (&a4, &v4->ipv4_addr, sizeof (a4));
1935 sb = &a4; 1933 sb = &a4;
1936 } 1934 }
@@ -1950,19 +1948,10 @@ udp_check_address (void *cls,
1950 return GNUNET_SYSERR; 1948 return GNUNET_SYSERR;
1951 1949
1952 af = AF_INET6; 1950 af = AF_INET6;
1953 port = ntohs (v6->u6_port);
1954 memcpy (&a6, &v6->ipv6_addr, sizeof (a6)); 1951 memcpy (&a6, &v6->ipv6_addr, sizeof (a6));
1955 sb = &a6; 1952 sb = &a6;
1956 } 1953 }
1957 1954
1958 inet_ntop (af, sb, buf, INET6_ADDRSTRLEN);
1959
1960#if DEBUG_UDP
1961 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1962 "Informing transport service about my address `%s:%u'\n",
1963 buf,
1964 port);
1965#endif
1966 return GNUNET_OK; 1955 return GNUNET_OK;
1967} 1956}
1968 1957