From: Matthias Wachs Date: Mon, 16 May 2011 11:34:36 +0000 (+0000) Subject: fixed bug breaking transport X-Git-Tag: initial-import-from-subversion-38251~18475 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f5d6436915b0b761593adbcb88dac91ab7841e0a;p=oweals%2Fgnunet.git fixed bug breaking transport plugin was bound to specific ip but returned all ip service --- 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 @@ #include "gnunet_transport_plugin.h" #include "transport.h" -#define DEBUG_TCP GNUNET_NO +#define DEBUG_TCP GNUNET_YES #define DEBUG_TCP_NAT GNUNET_NO @@ -2908,6 +2908,16 @@ libgnunet_plugin_transport_tcp_init (void *cls) GNUNET_SERVER_disconnect_notify (plugin->server, &disconnect_notify, plugin); + if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, + "transport-tcp", + "BINDTO", + &plugin->bind_address)) + { + GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, + "tcp", + _("Binding TCP plugin to specific address: `%s'\n"), + plugin->bind_address); + } GNUNET_OS_network_interfaces_list (&process_interfaces, plugin); if ( (plugin->behind_nat == GNUNET_YES) && @@ -2950,17 +2960,6 @@ libgnunet_plugin_transport_tcp_init (void *cls) _("TCP transport advertises itself as being on port %llu\n"), aport); - if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, - "transport-tcp", - "BINDTO", - &plugin->bind_address)) - { - GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, - "tcp", - _("Binding TCP plugin to specific address: `%s'\n"), - plugin->bind_address); - } - plugin->hostname_dns = GNUNET_RESOLVER_hostname_resolve (env->cfg, AF_UNSPEC, HOSTNAME_RESOLVE_TIMEOUT,