diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-11 11:42:58 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-11 11:42:58 +0000 |
commit | de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae (patch) | |
tree | 9e0ce50319fa2b86d25b6bc982fdd9f9bde13538 /src/transport/plugin_transport_tcp.c | |
parent | 8ab1946b4136cb0b20a47661bb54dbe0820ba04f (diff) | |
download | gnunet-de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae.tar.gz gnunet-de24f62f6916dcc6fd3b5464dc9fb2a72ca80bae.zip |
always add user provided external addresses (duh)
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 459057219..fca1b1f15 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -2358,6 +2358,13 @@ libgnunet_plugin_transport_tcp_init (void *cls) | |||
2358 | "tcp", | 2358 | "tcp", |
2359 | &t4, sizeof(t4), GNUNET_TIME_UNIT_FOREVER_REL); | 2359 | &t4, sizeof(t4), GNUNET_TIME_UNIT_FOREVER_REL); |
2360 | } | 2360 | } |
2361 | else if ((plugin->external_address != NULL) && (inet_pton(AF_INET, plugin->external_address, &t4.ipv4_addr) == 1)) | ||
2362 | { | ||
2363 | t4.t_port = htons(plugin->adv_port); | ||
2364 | plugin->env->notify_address (plugin->env->cls, | ||
2365 | "tcp", | ||
2366 | &t4, sizeof(t4), GNUNET_TIME_UNIT_FOREVER_REL); | ||
2367 | } | ||
2361 | 2368 | ||
2362 | return api; | 2369 | return api; |
2363 | } | 2370 | } |