diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-25 21:35:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-25 21:35:36 +0000 |
commit | 3ace86cc6a790b8a58554cfdc1c1a9077517224e (patch) | |
tree | ba458a4d5bbd861ff2fa07d33231fd87056b4ef8 /src/transport/plugin_transport_tcp.c | |
parent | 6446293d028db5fe66c53f70ab8194f6c47f3fa1 (diff) | |
download | gnunet-3ace86cc6a790b8a58554cfdc1c1a9077517224e.tar.gz gnunet-3ace86cc6a790b8a58554cfdc1c1a9077517224e.zip |
-unregister nat on error, indentation, DCE
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 2a8ca2eb9..02c0afaad 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -463,11 +463,6 @@ struct Plugin | |||
463 | struct TCPProbeContext *probe_tail; | 463 | struct TCPProbeContext *probe_tail; |
464 | 464 | ||
465 | /** | 465 | /** |
466 | * Handle for (DYN)DNS lookup of our external IP. | ||
467 | */ | ||
468 | struct GNUNET_RESOLVER_RequestHandle *ext_dns; | ||
469 | |||
470 | /** | ||
471 | * Function to call about session status changes. | 466 | * Function to call about session status changes. |
472 | */ | 467 | */ |
473 | GNUNET_TRANSPORT_SessionInfoCallback sic; | 468 | GNUNET_TRANSPORT_SessionInfoCallback sic; |
@@ -2002,7 +1997,8 @@ tcp_plugin_address_pretty_printer (void *cls, | |||
2002 | sbs, | 1997 | sbs, |
2003 | ! numeric, | 1998 | ! numeric, |
2004 | timeout, | 1999 | timeout, |
2005 | &append_port, ppc); | 2000 | &append_port, |
2001 | ppc); | ||
2006 | if (NULL == ppc->resolver_handle) | 2002 | if (NULL == ppc->resolver_handle) |
2007 | { | 2003 | { |
2008 | GNUNET_break (0); | 2004 | GNUNET_break (0); |
@@ -3011,10 +3007,12 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
3011 | GNUNET_YES, | 3007 | GNUNET_YES, |
3012 | aport, | 3008 | aport, |
3013 | (unsigned int) ret_s, | 3009 | (unsigned int) ret_s, |
3014 | (const struct sockaddr **) addrs, addrlens, | 3010 | (const struct sockaddr **) addrs, |
3011 | addrlens, | ||
3015 | &tcp_nat_port_map_callback, | 3012 | &tcp_nat_port_map_callback, |
3016 | &try_connection_reversal, | 3013 | &try_connection_reversal, |
3017 | plugin, NULL); | 3014 | plugin, |
3015 | NULL); | ||
3018 | for (ret = ret_s -1; ret >= 0; ret--) | 3016 | for (ret = ret_s -1; ret >= 0; ret--) |
3019 | GNUNET_free (addrs[ret]); | 3017 | GNUNET_free (addrs[ret]); |
3020 | GNUNET_free_non_null (addrs); | 3018 | GNUNET_free_non_null (addrs); |
@@ -3075,7 +3073,9 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
3075 | GNUNET_YES); | 3073 | GNUNET_YES); |
3076 | } | 3074 | } |
3077 | plugin->handlers = GNUNET_malloc (sizeof (my_handlers)); | 3075 | plugin->handlers = GNUNET_malloc (sizeof (my_handlers)); |
3078 | GNUNET_memcpy (plugin->handlers, my_handlers, sizeof(my_handlers)); | 3076 | GNUNET_memcpy (plugin->handlers, |
3077 | my_handlers, | ||
3078 | sizeof(my_handlers)); | ||
3079 | for (i = 0;i < sizeof(my_handlers) / sizeof(struct GNUNET_SERVER_MessageHandler);i++) | 3079 | for (i = 0;i < sizeof(my_handlers) / sizeof(struct GNUNET_SERVER_MessageHandler);i++) |
3080 | plugin->handlers[i].callback_cls = plugin; | 3080 | plugin->handlers[i].callback_cls = plugin; |
3081 | 3081 | ||