diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-08-28 11:43:40 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-08-28 11:43:40 +0000 |
commit | 415c261ba0169b53235d5e96da4d058e5e1f2d00 (patch) | |
tree | 262d87a0bf229e8a97f10f6a68371797b31fcf28 /src/transport/plugin_transport_http_server.c | |
parent | 2ec32745cf8b61bb257f4cb159f0d0ff83246e77 (diff) | |
download | gnunet-415c261ba0169b53235d5e96da4d058e5e1f2d00.tar.gz gnunet-415c261ba0169b53235d5e96da4d058e5e1f2d00.zip |
tests
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 2ce844307..46734e144 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -1857,8 +1857,11 @@ server_add_address (void *cls, int add_remove, const struct sockaddr *addr, | |||
1857 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 1857 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
1858 | "Notifying transport to add address `%s'\n", | 1858 | "Notifying transport to add address `%s'\n", |
1859 | http_common_plugin_address_to_string(NULL, w->addr, w->addrlen)); | 1859 | http_common_plugin_address_to_string(NULL, w->addr, w->addrlen)); |
1860 | 1860 | #if BUILD_HTTPS | |
1861 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "https_client"); | ||
1862 | #else | ||
1861 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "http_client"); | 1863 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "http_client"); |
1864 | #endif | ||
1862 | } | 1865 | } |
1863 | 1866 | ||
1864 | 1867 | ||
@@ -1889,7 +1892,11 @@ server_remove_address (void *cls, int add_remove, const struct sockaddr *addr, | |||
1889 | "Notifying transport to remove address `%s'\n", | 1892 | "Notifying transport to remove address `%s'\n", |
1890 | http_common_plugin_address_to_string (NULL, w->addr, w->addrlen)); | 1893 | http_common_plugin_address_to_string (NULL, w->addr, w->addrlen)); |
1891 | GNUNET_CONTAINER_DLL_remove (plugin->addr_head, plugin->addr_tail, w); | 1894 | GNUNET_CONTAINER_DLL_remove (plugin->addr_head, plugin->addr_tail, w); |
1895 | #if BUILD_HTTPS | ||
1896 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "https_client"); | ||
1897 | #else | ||
1892 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "http_client"); | 1898 | plugin->env->notify_address (plugin->env->cls, add_remove, w->addr, w->addrlen, "http_client"); |
1899 | #endif | ||
1893 | GNUNET_free (w->addr); | 1900 | GNUNET_free (w->addr); |
1894 | GNUNET_free (w); | 1901 | GNUNET_free (w); |
1895 | } | 1902 | } |
@@ -2253,9 +2260,16 @@ server_notify_external_hostname (void *cls, const struct GNUNET_SCHEDULER_TaskCo | |||
2253 | plugin->ext_addr_len = strlen (plugin->ext_addr) + 1; | 2260 | plugin->ext_addr_len = strlen (plugin->ext_addr) + 1; |
2254 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 2261 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
2255 | "Notifying transport about external hostname address `%s'\n", plugin->ext_addr); | 2262 | "Notifying transport about external hostname address `%s'\n", plugin->ext_addr); |
2263 | |||
2264 | #if BUILD_HTTPS | ||
2265 | plugin->env->notify_address (plugin->env->cls, GNUNET_YES, | ||
2266 | plugin->ext_addr, plugin->ext_addr_len, | ||
2267 | "https_client"); | ||
2268 | #else | ||
2256 | plugin->env->notify_address (plugin->env->cls, GNUNET_YES, | 2269 | plugin->env->notify_address (plugin->env->cls, GNUNET_YES, |
2257 | plugin->ext_addr, plugin->ext_addr_len, | 2270 | plugin->ext_addr, plugin->ext_addr_len, |
2258 | "http_client"); | 2271 | "http_client"); |
2272 | #endif | ||
2259 | } | 2273 | } |
2260 | 2274 | ||
2261 | 2275 | ||
@@ -2494,11 +2508,20 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
2494 | http_common_plugin_address_to_string (NULL, | 2508 | http_common_plugin_address_to_string (NULL, |
2495 | plugin->ext_addr, | 2509 | plugin->ext_addr, |
2496 | plugin->ext_addr_len)); | 2510 | plugin->ext_addr_len)); |
2511 | #if BUILD_HTTPS | ||
2497 | plugin->env->notify_address (plugin->env->cls, | 2512 | plugin->env->notify_address (plugin->env->cls, |
2498 | GNUNET_NO, | 2513 | GNUNET_NO, |
2499 | plugin->ext_addr, | 2514 | plugin->ext_addr, |
2500 | plugin->ext_addr_len, | 2515 | plugin->ext_addr_len, |
2501 | "http_client"); | 2516 | "https_client"); |
2517 | #else | ||
2518 | plugin->env->notify_address (plugin->env->cls, | ||
2519 | GNUNET_NO, | ||
2520 | plugin->ext_addr, | ||
2521 | plugin->ext_addr_len, | ||
2522 | "http_client"); | ||
2523 | #endif | ||
2524 | |||
2502 | } | 2525 | } |
2503 | 2526 | ||
2504 | /* Stop to report addresses to transport service */ | 2527 | /* Stop to report addresses to transport service */ |