aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2011-09-26 14:44:29 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2011-09-26 14:44:29 +0000
commit659f91758ced91c6a993e6632d8cbada69246bc7 (patch)
treec47365c20829cf2951d5e88a4dff2206497900eb /src/transport/plugin_transport_http_client.c
parentbc7af64f95c314bb67dc6ee69d466065edd811d5 (diff)
downloadgnunet-659f91758ced91c6a993e6632d8cbada69246bc7.tar.gz
gnunet-659f91758ced91c6a993e6632d8cbada69246bc7.zip
fixes
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index c5fea94a1..e4942248a 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -189,7 +189,7 @@ client_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
189 { 189 {
190#if DEBUG_HTTP 190#if DEBUG_HTTP
191 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 191 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
192 "Client: %X connection to '%s' %s ended\n", s, GNUNET_i2s(&s->target), GNUNET_a2s (s->addr, s->addrlen)); 192 "Client: %X connection to '%s' %s ended\n", msg->easy_handle, GNUNET_i2s(&s->target), GNUNET_a2s (s->addr, s->addrlen));
193#endif 193#endif
194 client_disconnect(s); 194 client_disconnect(s);
195 //GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,"Notifying about ended session to peer `%s' `%s'\n", GNUNET_i2s (&s->target), http_plugin_address_to_string (plugin, s->addr, s->addrlen)); 195 //GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,"Notifying about ended session to peer `%s' `%s'\n", GNUNET_i2s (&s->target), http_plugin_address_to_string (plugin, s->addr, s->addrlen));
@@ -214,15 +214,17 @@ client_disconnect (struct Session *s)
214 struct HTTP_Message * msg; 214 struct HTTP_Message * msg;
215 struct HTTP_Message * t; 215 struct HTTP_Message * t;
216 216
217
218
219 if (s->client_put != NULL)
220 {
217#if DEBUG_HTTP 221#if DEBUG_HTTP
218 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 222 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
219 "Client: %X Deleting outbound PUT session to peer `%s'\n", 223 "Client: %X Deleting outbound PUT session to peer `%s'\n",
220 s, 224 s->client_put,
221 GNUNET_i2s (&s->target)); 225 GNUNET_i2s (&s->target));
222#endif 226#endif
223 227
224 if (s->client_put != NULL)
225 {
226 mret = curl_multi_remove_handle (plugin->client_mh, s->client_put); 228 mret = curl_multi_remove_handle (plugin->client_mh, s->client_put);
227 if (mret != CURLM_OK) 229 if (mret != CURLM_OK)
228 { 230 {
@@ -234,12 +236,7 @@ client_disconnect (struct Session *s)
234 s->client_put = NULL; 236 s->client_put = NULL;
235 } 237 }
236 238
237#if DEBUG_HTTP 239
238 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
239 "Client: %X Deleting outbound GET session to peer `%s'\n",
240 s,
241 GNUNET_i2s (&s->target));
242#endif
243 if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) 240 if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK)
244 { 241 {
245 GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); 242 GNUNET_SCHEDULER_cancel (s->recv_wakeup_task);
@@ -248,6 +245,13 @@ client_disconnect (struct Session *s)
248 245
249 if (s->client_get != NULL) 246 if (s->client_get != NULL)
250 { 247 {
248#if DEBUG_HTTP
249 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
250 "Client: %X Deleting outbound GET session to peer `%s'\n",
251 s->client_get,
252 GNUNET_i2s (&s->target));
253#endif
254
251 mret = curl_multi_remove_handle (plugin->client_mh, s->client_get); 255 mret = curl_multi_remove_handle (plugin->client_mh, s->client_get);
252 if (mret != CURLM_OK) 256 if (mret != CURLM_OK)
253 { 257 {
@@ -429,7 +433,7 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls)
429#if VERBOSE_CLIENT 433#if VERBOSE_CLIENT
430 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 434 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
431 "Client: %X Message with %u bytes sent, removing message from queue\n", 435 "Client: %X Message with %u bytes sent, removing message from queue\n",
432 s, msg->size, msg->pos); 436 s->client_put, msg->size, msg->pos);
433#endif 437#endif
434 /* Calling transmit continuation */ 438 /* Calling transmit continuation */
435 if (NULL != msg->transmit_cont) 439 if (NULL != msg->transmit_cont)