diff options
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 00ee26d30..31bd7ba4f 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -2199,11 +2199,13 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin) | |||
2199 | * | 2199 | * |
2200 | * @param plugin our plugin | 2200 | * @param plugin our plugin |
2201 | * @param addr listen address to use | 2201 | * @param addr listen address to use |
2202 | * @param v6 MHD_NO_FLAG or MHD_USE_IPv6, depending on context | ||
2202 | * @return NULL on error | 2203 | * @return NULL on error |
2203 | */ | 2204 | */ |
2204 | static struct MHD_Daemon * | 2205 | static struct MHD_Daemon * |
2205 | run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, | 2206 | run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, |
2206 | const struct sockaddr_in *addr) | 2207 | const struct sockaddr_in *addr, |
2208 | int v6) | ||
2207 | { | 2209 | { |
2208 | struct MHD_Daemon *server; | 2210 | struct MHD_Daemon *server; |
2209 | unsigned int timeout; | 2211 | unsigned int timeout; |
@@ -2226,7 +2228,8 @@ run_mhd_start_daemon (struct HTTP_Server_Plugin *plugin, | |||
2226 | #if BUILD_HTTPS | 2228 | #if BUILD_HTTPS |
2227 | MHD_USE_SSL | | 2229 | MHD_USE_SSL | |
2228 | #endif | 2230 | #endif |
2229 | MHD_USE_SUSPEND_RESUME, | 2231 | MHD_USE_SUSPEND_RESUME | |
2232 | v6, | ||
2230 | plugin->port, | 2233 | plugin->port, |
2231 | &server_accept_cb, plugin, | 2234 | &server_accept_cb, plugin, |
2232 | &server_access_cb, plugin, | 2235 | &server_access_cb, plugin, |
@@ -2306,7 +2309,8 @@ server_start (struct HTTP_Server_Plugin *plugin) | |||
2306 | { | 2309 | { |
2307 | plugin->server_v4 | 2310 | plugin->server_v4 |
2308 | = run_mhd_start_daemon (plugin, | 2311 | = run_mhd_start_daemon (plugin, |
2309 | (const struct sockaddr_in *) plugin->server_addr_v4); | 2312 | (const struct sockaddr_in *) plugin->server_addr_v4, |
2313 | MHD_NO_FLAG); | ||
2310 | 2314 | ||
2311 | if (NULL == plugin->server_v4) | 2315 | if (NULL == plugin->server_v4) |
2312 | { | 2316 | { |
@@ -2327,7 +2331,8 @@ server_start (struct HTTP_Server_Plugin *plugin) | |||
2327 | { | 2331 | { |
2328 | plugin->server_v6 | 2332 | plugin->server_v6 |
2329 | = run_mhd_start_daemon (plugin, | 2333 | = run_mhd_start_daemon (plugin, |
2330 | (const struct sockaddr_in *) plugin->server_addr_v6); | 2334 | (const struct sockaddr_in *) plugin->server_addr_v6, |
2335 | MHD_USE_IPv6); | ||
2331 | if (NULL == plugin->server_v6) | 2336 | if (NULL == plugin->server_v6) |
2332 | { | 2337 | { |
2333 | LOG (GNUNET_ERROR_TYPE_ERROR, | 2338 | LOG (GNUNET_ERROR_TYPE_ERROR, |