aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-09-20 13:25:49 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-09-20 13:25:49 +0000
commitc66ce235370520e7a1c2c948cb7de99f65b267c4 (patch)
tree2ab64f78e8e8f3b21b8439caef46bdb0920cef70 /src/transport/plugin_transport_http_client.c
parente69e53040d9d676e950c5395b41430ae88a4ecb9 (diff)
downloadgnunet-c66ce235370520e7a1c2c948cb7de99f65b267c4.tar.gz
gnunet-c66ce235370520e7a1c2c948cb7de99f65b267c4.zip
- bug
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index bf24d97d6..3c422cf3e 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -1115,7 +1115,11 @@ client_connect_get (struct Session *s)
1115 mret = curl_multi_add_handle (s->plugin->curl_multi_handle, s->client_get); 1115 mret = curl_multi_add_handle (s->plugin->curl_multi_handle, s->client_get);
1116 if (mret != CURLM_OK) 1116 if (mret != CURLM_OK)
1117 { 1117 {
1118 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
1119 "Session %p : Failed to add GET handle to multihandle: `%s'\n",
1120 s, curl_multi_strerror (mret));
1118 curl_easy_cleanup (s->client_get); 1121 curl_easy_cleanup (s->client_get);
1122 s->client_get = NULL;
1119 GNUNET_break (0); 1123 GNUNET_break (0);
1120 return GNUNET_SYSERR; 1124 return GNUNET_SYSERR;
1121 } 1125 }
@@ -1130,8 +1134,15 @@ client_connect_put (struct Session *s)
1130 /* create put connection */ 1134 /* create put connection */
1131 if (NULL == s->client_put) 1135 if (NULL == s->client_put)
1132 { 1136 {
1137 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
1138 "Session %p : Init PUT handle \n", s);
1133 s->client_put = curl_easy_init (); 1139 s->client_put = curl_easy_init ();
1134 } 1140 }
1141 else
1142 {
1143 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
1144 "Session %p : Reusing PUT handle %p \n", s, s->client_put);
1145 }
1135#if VERBOSE_CURL 1146#if VERBOSE_CURL
1136 curl_easy_setopt (s->client_put, CURLOPT_VERBOSE, 1L); 1147 curl_easy_setopt (s->client_put, CURLOPT_VERBOSE, 1L);
1137 curl_easy_setopt (s->client_put, CURLOPT_DEBUGFUNCTION, &client_log); 1148 curl_easy_setopt (s->client_put, CURLOPT_DEBUGFUNCTION, &client_log);
@@ -1164,9 +1175,8 @@ client_connect_put (struct Session *s)
1164 if (mret != CURLM_OK) 1175 if (mret != CURLM_OK)
1165 { 1176 {
1166 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name, 1177 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
1167 "Failed to add curl handle to multihandle: `%s'\n", 1178 "Session %p : Failed to add PUT handle to multihandle: `%s'\n",
1168 curl_multi_strerror (mret)); 1179 s, curl_multi_strerror (mret));
1169
1170 curl_easy_cleanup (s->client_put); 1180 curl_easy_cleanup (s->client_put);
1171 s->client_put = NULL; 1181 s->client_put = NULL;
1172 return GNUNET_SYSERR; 1182 return GNUNET_SYSERR;