aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r--src/transport/plugin_transport_http_client.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index c64a594cd..cf21a425a 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -157,10 +157,8 @@ client_send (struct Session *s, struct HTTP_Message *msg)
157 157
158 if (s->client_put_paused == GNUNET_YES) 158 if (s->client_put_paused == GNUNET_YES)
159 { 159 {
160#if VERBOSE_CLIENT
161 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name, 160 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
162 "Client: %X was suspended, unpausing\n", s->client_put); 161 "Client: %X was suspended, unpausing\n", s->client_put);
163#endif
164 s->client_put_paused = GNUNET_NO; 162 s->client_put_paused = GNUNET_NO;
165 curl_easy_pause (s->client_put, CURLPAUSE_CONT); 163 curl_easy_pause (s->client_put, CURLPAUSE_CONT);
166 } 164 }
@@ -354,14 +352,12 @@ client_receive_mst_cb (void *cls, void *client,
354 352
355 if (GNUNET_TIME_absolute_get ().abs_value < s->next_receive.abs_value) 353 if (GNUNET_TIME_absolute_get ().abs_value < s->next_receive.abs_value)
356 { 354 {
357#if VERBOSE_CLIENT
358 struct Plugin *plugin = s->plugin; 355 struct Plugin *plugin = s->plugin;
359 356
360 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 357 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
361 "Client: peer `%s' address `%s' next read delayed for %llu ms\n", 358 "Client: peer `%s' address `%s' next read delayed for %llu ms\n",
362 GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen), 359 GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen),
363 delay); 360 delay);
364#endif
365 } 361 }
366} 362}
367 363
@@ -404,29 +400,20 @@ client_receive (void *stream, size_t size, size_t nmemb, void *cls)
404 struct Session *s = cls; 400 struct Session *s = cls;
405 struct GNUNET_TIME_Absolute now; 401 struct GNUNET_TIME_Absolute now;
406 size_t len = size * nmemb; 402 size_t len = size * nmemb;
407
408
409
410
411#if VERBOSE_CLIENT
412 struct Plugin *plugin = s->plugin; 403 struct Plugin *plugin = s->plugin;
413 404
414 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 405 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
415 "Client: Received %Zu bytes from peer `%s'\n", len, 406 "Client: Received %Zu bytes from peer `%s'\n", len,
416 GNUNET_i2s (&s->target)); 407 GNUNET_i2s (&s->target));
417#endif
418
419 now = GNUNET_TIME_absolute_get (); 408 now = GNUNET_TIME_absolute_get ();
420 if (now.abs_value < s->next_receive.abs_value) 409 if (now.abs_value < s->next_receive.abs_value)
421 { 410 {
422 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); 411 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
423 struct GNUNET_TIME_Relative delta = 412 struct GNUNET_TIME_Relative delta =
424 GNUNET_TIME_absolute_get_difference (now, s->next_receive); 413 GNUNET_TIME_absolute_get_difference (now, s->next_receive);
425#if DEBUG_CLIENT
426 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 414 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
427 "Client: %X No inbound bandwidth available! Next read was delayed for %llu ms\n", 415 "Client: %X No inbound bandwidth available! Next read was delayed for %llu ms\n",
428 s->client_get, delta.rel_value); 416 s->client_get, delta.rel_value);
429#endif
430 if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) 417 if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK)
431 { 418 {
432 GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); 419 GNUNET_SCHEDULER_cancel (s->recv_wakeup_task);
@@ -459,10 +446,7 @@ static size_t
459client_send_cb (void *stream, size_t size, size_t nmemb, void *cls) 446client_send_cb (void *stream, size_t size, size_t nmemb, void *cls)
460{ 447{
461 struct Session *s = cls; 448 struct Session *s = cls;
462
463#if VERBOSE_CLIENT
464 struct Plugin *plugin = s->plugin; 449 struct Plugin *plugin = s->plugin;
465#endif
466 size_t bytes_sent = 0; 450 size_t bytes_sent = 0;
467 size_t len; 451 size_t len;
468 452
@@ -476,11 +460,9 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls)
476 460
477 if (msg == NULL) 461 if (msg == NULL)
478 { 462 {
479#if VERBOSE_CLIENT
480 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 463 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
481 "Client: %X Nothing to send! Suspending PUT handle!\n", 464 "Client: %X Nothing to send! Suspending PUT handle!\n",
482 s->client_put); 465 s->client_put);
483#endif
484 s->client_put_paused = GNUNET_YES; 466 s->client_put_paused = GNUNET_YES;
485 return CURL_READFUNC_PAUSE; 467 return CURL_READFUNC_PAUSE;
486 } 468 }
@@ -514,11 +496,9 @@ client_send_cb (void *stream, size_t size, size_t nmemb, void *cls)
514 496
515 if (msg->pos == msg->size) 497 if (msg->pos == msg->size)
516 { 498 {
517#if VERBOSE_CLIENT
518 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 499 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
519 "Client: %X Message with %u bytes sent, removing message from queue\n", 500 "Client: %X Message with %u bytes sent, removing message from queue\n",
520 s->client_put, msg->size, msg->pos); 501 s->client_put, msg->size, msg->pos);
521#endif
522 /* Calling transmit continuation */ 502 /* Calling transmit continuation */
523 if (NULL != msg->transmit_cont) 503 if (NULL != msg->transmit_cont)
524 msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK); 504 msg->transmit_cont (msg->transmit_cont_cls, &s->target, GNUNET_OK);
@@ -536,15 +516,10 @@ client_connect (struct Session *s)
536 char *url; 516 char *url;
537 CURLMcode mret; 517 CURLMcode mret;
538 518
539#if VERBOSE_CLIENT
540#endif
541 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 519 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
542 "Initiating outbound session peer `%s'\n", 520 "Initiating outbound session peer `%s'\n",
543 GNUNET_i2s (&s->target)); 521 GNUNET_i2s (&s->target));
544
545
546 s->inbound = GNUNET_NO; 522 s->inbound = GNUNET_NO;
547
548 plugin->last_tag++; 523 plugin->last_tag++;
549 /* create url */ 524 /* create url */
550 GNUNET_asprintf (&url, "%s%s;%u", 525 GNUNET_asprintf (&url, "%s%s;%u",