From: Matthias Wachs Date: Tue, 20 Jul 2010 12:31:27 +0000 (+0000) Subject: FIX: no curl scheduling if no curl handles are running, because this causes segfault... X-Git-Tag: initial-import-from-subversion-38251~20898 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=267b20d7b9e3d5b718deb086c808d66b136117eb;p=oweals%2Fgnunet.git FIX: no curl scheduling if no curl handles are running, because this causes segfault on sparc machine --- diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 5cd611d1f..43e8fd291 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -1439,7 +1439,7 @@ static void curl_perform (void *cls, handles_last_run = running; } while (mret == CURLM_CALL_MULTI_PERFORM); - curl_schedule(plugin); + if (running>0) curl_schedule(plugin); } @@ -1462,6 +1462,7 @@ static int curl_schedule(void *cls ) GNUNET_assert(cls !=NULL); + /* Cancel previous scheduled task */ if (plugin->http_curl_task != GNUNET_SCHEDULER_NO_TASK) { @@ -2372,7 +2373,7 @@ libgnunet_plugin_transport_http_init (void *cls) plugin , &mdh_access_cb, plugin, MHD_OPTION_SOCK_ADDR, tmp, MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 32, - MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 6, + //MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 6, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) timeout, MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (16 * 1024), MHD_OPTION_NOTIFY_COMPLETED, &mhd_termination_cb, NULL, @@ -2390,7 +2391,7 @@ libgnunet_plugin_transport_http_init (void *cls) plugin , &mdh_access_cb, plugin, MHD_OPTION_SOCK_ADDR, (struct sockaddr_in *)plugin->bind4_address, MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 32, - MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 6, + //MHD_OPTION_PER_IP_CONNECTION_LIMIT, (unsigned int) 6, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) timeout, MHD_OPTION_CONNECTION_MEMORY_LIMIT, (size_t) (16 * 1024), MHD_OPTION_NOTIFY_COMPLETED, &mhd_termination_cb, NULL,