diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-06-28 07:57:17 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-06-28 07:57:17 +0000 |
commit | c6a2c9c1199b77cdd7f743c5a30174bb01db1870 (patch) | |
tree | ffc12cb50b7b4754b2d5dedc47b3a718a4cdd432 | |
parent | 14cd6d30df08dd7cf60b134b5c165de5b31c2fc3 (diff) | |
download | gnunet-c6a2c9c1199b77cdd7f743c5a30174bb01db1870.tar.gz gnunet-c6a2c9c1199b77cdd7f743c5a30174bb01db1870.zip |
-rw-r--r-- | src/transport/plugin_transport_http.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 3aebbcf83..d6a7fd7b9 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -930,6 +930,7 @@ static ssize_t send_initiate (void *cls, struct Session* ses , struct HTTP_Conne | |||
930 | int bytes_sent = 0; | 930 | int bytes_sent = 0; |
931 | CURLMcode mret; | 931 | CURLMcode mret; |
932 | struct HTTP_Message * msg; | 932 | struct HTTP_Message * msg; |
933 | struct GNUNET_TIME_Relative timeout = GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT; | ||
933 | 934 | ||
934 | /* already connected, no need to initiate connection */ | 935 | /* already connected, no need to initiate connection */ |
935 | if ((con->connected == GNUNET_YES) && (con->curl_handle != NULL) && (con->send_paused == GNUNET_NO)) | 936 | if ((con->connected == GNUNET_YES) && (con->curl_handle != NULL) && (con->send_paused == GNUNET_NO)) |
@@ -965,7 +966,7 @@ static ssize_t send_initiate (void *cls, struct Session* ses , struct HTTP_Conne | |||
965 | curl_easy_setopt(con->curl_handle, CURLOPT_READDATA, con); | 966 | curl_easy_setopt(con->curl_handle, CURLOPT_READDATA, con); |
966 | curl_easy_setopt(con->curl_handle, CURLOPT_WRITEFUNCTION, send_write_callback); | 967 | curl_easy_setopt(con->curl_handle, CURLOPT_WRITEFUNCTION, send_write_callback); |
967 | curl_easy_setopt(con->curl_handle, CURLOPT_READDATA, con); | 968 | curl_easy_setopt(con->curl_handle, CURLOPT_READDATA, con); |
968 | curl_easy_setopt(con->curl_handle, CURLOPT_TIMEOUT, GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); | 969 | curl_easy_setopt(con->curl_handle, CURLOPT_TIMEOUT, (long) timeout.value); |
969 | curl_easy_setopt(con->curl_handle, CURLOPT_PRIVATE, con); | 970 | curl_easy_setopt(con->curl_handle, CURLOPT_PRIVATE, con); |
970 | curl_easy_setopt(con->curl_handle, CURLOPT_CONNECTTIMEOUT, HTTP_CONNECT_TIMEOUT_DBG); | 971 | curl_easy_setopt(con->curl_handle, CURLOPT_CONNECTTIMEOUT, HTTP_CONNECT_TIMEOUT_DBG); |
971 | curl_easy_setopt(con->curl_handle, CURLOPT_BUFFERSIZE, GNUNET_SERVER_MAX_MESSAGE_SIZE); | 972 | curl_easy_setopt(con->curl_handle, CURLOPT_BUFFERSIZE, GNUNET_SERVER_MAX_MESSAGE_SIZE); |
@@ -1018,7 +1019,7 @@ static void send_execute (void *cls, | |||
1018 | break; | 1019 | break; |
1019 | /* get session for affected curl handle */ | 1020 | /* get session for affected curl handle */ |
1020 | GNUNET_assert ( msg->easy_handle != NULL ); | 1021 | GNUNET_assert ( msg->easy_handle != NULL ); |
1021 | curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &con); | 1022 | curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, (char *) &con); |
1022 | GNUNET_assert ( con != NULL ); | 1023 | GNUNET_assert ( con != NULL ); |
1023 | cs = con->session; | 1024 | cs = con->session; |
1024 | GNUNET_assert ( cs != NULL ); | 1025 | GNUNET_assert ( cs != NULL ); |