diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-18 15:55:12 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-18 15:55:12 +0000 |
commit | 6d91f133149ea81040340e8853d7d6e94e57947c (patch) | |
tree | 909f05982b8be5c7cf6de927aabc3a9bb6312d60 /src/transport/plugin_transport_tcp.c | |
parent | 475452849162e7c123141d9710b2cf3480e8f868 (diff) | |
download | gnunet-6d91f133149ea81040340e8853d7d6e94e57947c.tar.gz gnunet-6d91f133149ea81040340e8853d7d6e94e57947c.zip |
cleanup
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 7e3bc080c..5896461f5 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -1712,18 +1712,6 @@ handle_tcp_data (void *cls, | |||
1712 | 1712 | ||
1713 | 1713 | ||
1714 | /** | 1714 | /** |
1715 | * Handlers for the various TCP messages. | ||
1716 | */ | ||
1717 | static struct GNUNET_SERVER_MessageHandler my_handlers[] = { | ||
1718 | {&handle_tcp_welcome, NULL, GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME, | ||
1719 | sizeof (struct WelcomeMessage)}, | ||
1720 | {&handle_tcp_nat_probe, NULL, GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE, sizeof (struct TCP_NAT_ProbeMessage)}, | ||
1721 | {&handle_tcp_data, NULL, GNUNET_MESSAGE_TYPE_ALL, 0}, | ||
1722 | {NULL, NULL, 0, 0} | ||
1723 | }; | ||
1724 | |||
1725 | |||
1726 | /** | ||
1727 | * Functions with this signature are called whenever a peer | 1715 | * Functions with this signature are called whenever a peer |
1728 | * is disconnected on the network level. | 1716 | * is disconnected on the network level. |
1729 | * | 1717 | * |
@@ -2150,6 +2138,13 @@ check_gnunet_nat_binary(char *binary) | |||
2150 | void * | 2138 | void * |
2151 | libgnunet_plugin_transport_tcp_init (void *cls) | 2139 | libgnunet_plugin_transport_tcp_init (void *cls) |
2152 | { | 2140 | { |
2141 | static const struct GNUNET_SERVER_MessageHandler my_handlers[] = { | ||
2142 | {&handle_tcp_welcome, NULL, GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_WELCOME, | ||
2143 | sizeof (struct WelcomeMessage)}, | ||
2144 | {&handle_tcp_nat_probe, NULL, GNUNET_MESSAGE_TYPE_TRANSPORT_TCP_NAT_PROBE, sizeof (struct TCP_NAT_ProbeMessage)}, | ||
2145 | {&handle_tcp_data, NULL, GNUNET_MESSAGE_TYPE_ALL, 0}, | ||
2146 | {NULL, NULL, 0, 0} | ||
2147 | }; | ||
2153 | struct GNUNET_TRANSPORT_PluginEnvironment *env = cls; | 2148 | struct GNUNET_TRANSPORT_PluginEnvironment *env = cls; |
2154 | struct GNUNET_TRANSPORT_PluginFunctions *api; | 2149 | struct GNUNET_TRANSPORT_PluginFunctions *api; |
2155 | struct Plugin *plugin; | 2150 | struct Plugin *plugin; |