aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-12-14 13:32:40 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-12-14 13:32:40 +0000
commite8609f2fc7dfb7347398f09aed6446b30a77a700 (patch)
tree041ea39a39aa5354876fe2f8730c286eb429efa0 /src/transport/plugin_transport_http.c
parentcf5de44a6784fc5cfaf5a32808c594bee4d26060 (diff)
downloadgnunet-e8609f2fc7dfb7347398f09aed6446b30a77a700.tar.gz
gnunet-e8609f2fc7dfb7347398f09aed6446b30a77a700.zip
wan/lan detection in plugins
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r--src/transport/plugin_transport_http.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c
index b290e5ba2..177a71719 100644
--- a/src/transport/plugin_transport_http.c
+++ b/src/transport/plugin_transport_http.c
@@ -577,6 +577,9 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
577 s4.sin_family = AF_INET; 577 s4.sin_family = AF_INET;
578 s4.sin_addr.s_addr = a4->ipv4_addr; 578 s4.sin_addr.s_addr = a4->ipv4_addr;
579 s4.sin_port = a4->u4_port; 579 s4.sin_port = a4->u4_port;
580#if HAVE_SOCKADDR_IN_SIN_LEN
581 s4.sin_len = sizeof (struct sockaddr_in);
582#endif
580 ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s4, sizeof (struct sockaddr_in)); 583 ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s4, sizeof (struct sockaddr_in));
581 584
582 if ((ntohs (a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO)) 585 if ((ntohs (a4->u4_port) == 0) || (plugin->ipv4 == GNUNET_NO))
@@ -590,6 +593,9 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
590 s6.sin6_family = AF_INET6; 593 s6.sin6_family = AF_INET6;
591 s6.sin6_addr = a6->ipv6_addr; 594 s6.sin6_addr = a6->ipv6_addr;
592 s6.sin6_port = a6->u6_port; 595 s6.sin6_port = a6->u6_port;
596#if HAVE_SOCKADDR_IN_SIN_LEN
597 s6.sin6_len = sizeof (struct sockaddr_in6);
598#endif
593 ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s6, sizeof (struct sockaddr_in6)); 599 ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s6, sizeof (struct sockaddr_in6));
594 600
595 if ((ntohs (a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO)) 601 if ((ntohs (a6->u6_port) == 0) || (plugin->ipv6 == GNUNET_NO))