aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 0087cfee3..3f20d30a5 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -559,7 +559,8 @@ tcp_nat_port_map_callback (void *cls,
559 void *arg; 559 void *arg;
560 size_t args; 560 size_t args;
561 561
562 LOG(GNUNET_ERROR_TYPE_INFO, "NAT notification to %s address `%s'\n", 562 LOG(GNUNET_ERROR_TYPE_INFO,
563 "NAT notification to %s address `%s'\n",
563 (GNUNET_YES == add_remove) ? "add" : "remove", 564 (GNUNET_YES == add_remove) ? "add" : "remove",
564 GNUNET_a2s (addr, addrlen)); 565 GNUNET_a2s (addr, addrlen));
565 /* convert 'addr' to our internal format */ 566 /* convert 'addr' to our internal format */
@@ -2133,7 +2134,8 @@ handle_tcp_nat_probe (void *cls,
2133 const struct sockaddr_in *s4; 2134 const struct sockaddr_in *s4;
2134 const struct sockaddr_in6 *s6; 2135 const struct sockaddr_in6 *s6;
2135 2136
2136 LOG(GNUNET_ERROR_TYPE_DEBUG, "Received NAT probe\n"); 2137 LOG (GNUNET_ERROR_TYPE_DEBUG,
2138 "Received NAT probe\n");
2137 /* We have received a TCP NAT probe, meaning we (hopefully) initiated 2139 /* We have received a TCP NAT probe, meaning we (hopefully) initiated
2138 * a connection to this peer by running gnunet-nat-client. This peer 2140 * a connection to this peer by running gnunet-nat-client. This peer
2139 * received the punch message and now wants us to use the new connection 2141 * received the punch message and now wants us to use the new connection
@@ -2157,7 +2159,7 @@ handle_tcp_nat_probe (void *cls,
2157 } 2159 }
2158 2160
2159 session = GNUNET_CONTAINER_multipeermap_get (plugin->nat_wait_conns, 2161 session = GNUNET_CONTAINER_multipeermap_get (plugin->nat_wait_conns,
2160 &tcp_nat_probe->clientIdentity); 2162 &tcp_nat_probe->clientIdentity);
2161 if (session == NULL) 2163 if (session == NULL)
2162 { 2164 {
2163 LOG (GNUNET_ERROR_TYPE_DEBUG, 2165 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -2877,8 +2879,14 @@ libgnunet_plugin_transport_tcp_init (void *cls)
2877 else 2879 else
2878 { 2880 {
2879 plugin->nat = GNUNET_NAT_register (plugin->env->cfg, 2881 plugin->nat = GNUNET_NAT_register (plugin->env->cfg,
2880 GNUNET_YES, 0, 0, NULL, NULL, NULL, 2882 GNUNET_YES,
2881 &try_connection_reversal, plugin); 2883 0,
2884 0,
2885 NULL,
2886 NULL,
2887 NULL,
2888 &try_connection_reversal,
2889 plugin);
2882 } 2890 }
2883 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions); 2891 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
2884 api->cls = plugin; 2892 api->cls = plugin;