aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-05-16 11:34:36 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-05-16 11:34:36 +0000
commitf5d6436915b0b761593adbcb88dac91ab7841e0a (patch)
treee6161206fc22937ea16330b79e3671f7e0c7cb96 /src/transport/plugin_transport_tcp.c
parent7da20a5380636b140c671f5a00aceabae0feccc1 (diff)
downloadgnunet-f5d6436915b0b761593adbcb88dac91ab7841e0a.tar.gz
gnunet-f5d6436915b0b761593adbcb88dac91ab7841e0a.zip
fixed bug breaking transport
plugin was bound to specific ip but returned all ip service
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index ecec4c6d5..feae04d26 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -38,7 +38,7 @@
38#include "gnunet_transport_plugin.h" 38#include "gnunet_transport_plugin.h"
39#include "transport.h" 39#include "transport.h"
40 40
41#define DEBUG_TCP GNUNET_NO 41#define DEBUG_TCP GNUNET_YES
42 42
43#define DEBUG_TCP_NAT GNUNET_NO 43#define DEBUG_TCP_NAT GNUNET_NO
44 44
@@ -2908,6 +2908,16 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2908 GNUNET_SERVER_disconnect_notify (plugin->server, 2908 GNUNET_SERVER_disconnect_notify (plugin->server,
2909 &disconnect_notify, 2909 &disconnect_notify,
2910 plugin); 2910 plugin);
2911 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
2912 "transport-tcp",
2913 "BINDTO",
2914 &plugin->bind_address))
2915 {
2916 GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
2917 "tcp",
2918 _("Binding TCP plugin to specific address: `%s'\n"),
2919 plugin->bind_address);
2920 }
2911 GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); 2921 GNUNET_OS_network_interfaces_list (&process_interfaces, plugin);
2912 2922
2913 if ( (plugin->behind_nat == GNUNET_YES) && 2923 if ( (plugin->behind_nat == GNUNET_YES) &&
@@ -2950,17 +2960,6 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2950 _("TCP transport advertises itself as being on port %llu\n"), 2960 _("TCP transport advertises itself as being on port %llu\n"),
2951 aport); 2961 aport);
2952 2962
2953 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
2954 "transport-tcp",
2955 "BINDTO",
2956 &plugin->bind_address))
2957 {
2958 GNUNET_log_from (GNUNET_ERROR_TYPE_INFO,
2959 "tcp",
2960 _("Binding TCP plugin to specific address: `%s'\n"),
2961 plugin->bind_address);
2962 }
2963
2964 plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (env->cfg, 2963 plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (env->cfg,
2965 AF_UNSPEC, 2964 AF_UNSPEC,
2966 HOSTNAME_RESOLVE_TIMEOUT, 2965 HOSTNAME_RESOLVE_TIMEOUT,