diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-09-27 10:59:27 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-09-27 10:59:27 +0000 |
commit | 31cca448e4178022c29e23e57aaeb4145fee2a4f (patch) | |
tree | 22a27546bbb14ebcc1fb194a0097324dc72deee4 /src/transport | |
parent | edab319f07cc940f64111b6e89da245a2afcf71a (diff) | |
download | gnunet-31cca448e4178022c29e23e57aaeb4145fee2a4f.tar.gz gnunet-31cca448e4178022c29e23e57aaeb4145fee2a4f.zip |
working version
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_http.h | 10 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 37 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_new.c | 16 | ||||
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 25 |
4 files changed, 44 insertions, 44 deletions
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h index 7120accfb..16e480a67 100644 --- a/src/transport/plugin_transport_http.h +++ b/src/transport/plugin_transport_http.h | |||
@@ -42,10 +42,10 @@ | |||
42 | #include <curl/curl.h> | 42 | #include <curl/curl.h> |
43 | 43 | ||
44 | 44 | ||
45 | #define DEBUG_HTTP GNUNET_YES | 45 | #define DEBUG_HTTP GNUNET_NO |
46 | #define VERBOSE_SERVER GNUNET_YES | 46 | #define VERBOSE_SERVER GNUNET_NO |
47 | #define VERBOSE_CLIENT GNUNET_YES | 47 | #define VERBOSE_CLIENT GNUNET_NO |
48 | #define VERBOSE_CURL GNUNET_YES | 48 | #define VERBOSE_CURL GNUNET_NO |
49 | 49 | ||
50 | #if BUILD_HTTPS | 50 | #if BUILD_HTTPS |
51 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_https_init | 51 | #define LIBGNUNET_PLUGIN_TRANSPORT_INIT libgnunet_plugin_transport_https_init |
@@ -248,7 +248,7 @@ struct Session | |||
248 | 248 | ||
249 | void *server_recv; | 249 | void *server_recv; |
250 | void *server_send; | 250 | void *server_send; |
251 | struct GNUNET_TIME_Absolute delay; | 251 | struct GNUNET_TIME_Absolute next_receive; |
252 | GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task; | 252 | GNUNET_SCHEDULER_TaskIdentifier recv_wakeup_task; |
253 | uint32_t tag; | 253 | uint32_t tag; |
254 | 254 | ||
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index cd68a0069..bc2051eef 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -146,7 +146,9 @@ client_send (struct Session *s, struct HTTP_Message *msg) | |||
146 | 146 | ||
147 | if ((s != NULL) && (s->client_put_paused == GNUNET_YES)) | 147 | if ((s != NULL) && (s->client_put_paused == GNUNET_YES)) |
148 | { | 148 | { |
149 | #if VERBOSE_CLIENT | ||
149 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name, "Client: %X was suspended, unpausing\n", s->client_put); | 150 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name, "Client: %X was suspended, unpausing\n", s->client_put); |
151 | #endif | ||
150 | s->client_put_paused = GNUNET_NO; | 152 | s->client_put_paused = GNUNET_NO; |
151 | curl_easy_pause(s->client_put, CURLPAUSE_CONT); | 153 | curl_easy_pause(s->client_put, CURLPAUSE_CONT); |
152 | } | 154 | } |
@@ -306,10 +308,13 @@ client_receive_mst_cb (void *cls, void *client, | |||
306 | struct GNUNET_TIME_Relative delay; | 308 | struct GNUNET_TIME_Relative delay; |
307 | 309 | ||
308 | delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); | 310 | delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); |
311 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "CLIENT: CLIENT DELAY %llu ms\n", | ||
312 | delay.rel_value); | ||
313 | |||
309 | 314 | ||
310 | s->delay = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), delay); | 315 | s->next_receive = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), delay); |
311 | 316 | ||
312 | if (GNUNET_TIME_absolute_get().abs_value < s->delay.abs_value) | 317 | if (GNUNET_TIME_absolute_get().abs_value < s->next_receive.abs_value) |
313 | { | 318 | { |
314 | #if VERBOSE_CLIENT | 319 | #if VERBOSE_CLIENT |
315 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: peer `%s' address `%s' next read delayed for %llu ms\n", | 320 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: peer `%s' address `%s' next read delayed for %llu ms\n", |
@@ -343,32 +348,32 @@ static size_t | |||
343 | client_receive (void *stream, size_t size, size_t nmemb, void *cls) | 348 | client_receive (void *stream, size_t size, size_t nmemb, void *cls) |
344 | { | 349 | { |
345 | struct Session *s = cls; | 350 | struct Session *s = cls; |
346 | struct Plugin *plugin = s->plugin; | ||
347 | struct GNUNET_TIME_Absolute now; | 351 | struct GNUNET_TIME_Absolute now; |
348 | size_t len = size * nmemb; | 352 | size_t len = size * nmemb; |
349 | 353 | ||
350 | 354 | ||
351 | #if VERBOSE_CLIENT | 355 | #if VERBOSE_CLIENT |
356 | struct Plugin *plugin = s->plugin; | ||
352 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: Received %Zu bytes from peer `%s'\n", | 357 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: Received %Zu bytes from peer `%s'\n", |
353 | len, | 358 | len, |
354 | GNUNET_i2s (&s->target)); | 359 | GNUNET_i2s (&s->target)); |
355 | #endif | 360 | #endif |
356 | 361 | ||
357 | now = GNUNET_TIME_absolute_get(); | 362 | now = GNUNET_TIME_absolute_get(); |
358 | if (now.abs_value < s->delay.abs_value) | 363 | if (now.abs_value < s->next_receive.abs_value) |
359 | { | 364 | { |
360 | #if 0 | ||
361 | #if DEBUG_CLIENT | 365 | #if DEBUG_CLIENT |
362 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 366 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
363 | "No inbound bandwidth available! Next read was delayed for %llu ms\n", | 367 | "No inbound bandwidth available! Next read was delayed for %llu ms\n", |
364 | s, GNUNET_TIME_absolute_get_difference(s->delay, GNUNET_TIME_absolute_get()).rel_value); | 368 | s, GNUNET_TIME_absolute_get_difference(s->next_receive, GNUNET_TIME_absolute_get()).rel_value); |
365 | #endif | 369 | #endif |
370 | #if 0 | ||
366 | if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) | 371 | if (s->recv_wakeup_task != GNUNET_SCHEDULER_NO_TASK) |
367 | { | 372 | { |
368 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); | 373 | GNUNET_SCHEDULER_cancel (s->recv_wakeup_task); |
369 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; | 374 | s->recv_wakeup_task = GNUNET_SCHEDULER_NO_TASK; |
370 | } | 375 | } |
371 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed( GNUNET_TIME_absolute_get_difference(s->delay, now), &client_wake_up, s); | 376 | s->recv_wakeup_task = GNUNET_SCHEDULER_add_delayed( GNUNET_TIME_absolute_get_difference(s->next_receive, now), &client_wake_up, s); |
372 | return CURLPAUSE_ALL; | 377 | return CURLPAUSE_ALL; |
373 | #endif | 378 | #endif |
374 | } | 379 | } |
@@ -398,27 +403,19 @@ static size_t | |||
398 | client_send_cb (void *stream, size_t size, size_t nmemb, void *cls) | 403 | client_send_cb (void *stream, size_t size, size_t nmemb, void *cls) |
399 | { | 404 | { |
400 | struct Session *s = cls; | 405 | struct Session *s = cls; |
406 | #if VERBOSE_CLIENT | ||
401 | struct Plugin *plugin = s->plugin; | 407 | struct Plugin *plugin = s->plugin; |
408 | #endif | ||
402 | size_t bytes_sent = 0; | 409 | size_t bytes_sent = 0; |
403 | size_t len; | 410 | size_t len; |
404 | 411 | ||
405 | struct HTTP_Message *msg = s->msg_head; | 412 | struct HTTP_Message *msg = s->msg_head; |
406 | /* | 413 | |
407 | if (s->put_paused == GNUNET_NO) | ||
408 | return CURL_READFUNC_PAUSE; | ||
409 | if ((s->msg_head == NULL) && (s->put_paused == GNUNET_YES)) | ||
410 | { | ||
411 | #if VERBOSE_CLIENT | ||
412 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Suspending handle `%s' `%s'\n", | ||
413 | GNUNET_i2s (&s->target),GNUNET_a2s (s->addr, s->addrlen)); | ||
414 | #endif | ||
415 | s->put_paused = GNUNET_NO; | ||
416 | return CURL_READFUNC_PAUSE; | ||
417 | } | ||
418 | */ | ||
419 | if (msg == NULL) | 414 | if (msg == NULL) |
420 | { | 415 | { |
416 | #if VERBOSE_CLIENT | ||
421 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: %X Nothing to send! Suspending PUT handle!\n", s->client_put); | 417 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Client: %X Nothing to send! Suspending PUT handle!\n", s->client_put); |
418 | #endif | ||
422 | s->client_put_paused = GNUNET_YES; | 419 | s->client_put_paused = GNUNET_YES; |
423 | return CURL_READFUNC_PAUSE; | 420 | return CURL_READFUNC_PAUSE; |
424 | } | 421 | } |
diff --git a/src/transport/plugin_transport_http_new.c b/src/transport/plugin_transport_http_new.c index 042c977f5..66f79b3c4 100644 --- a/src/transport/plugin_transport_http_new.c +++ b/src/transport/plugin_transport_http_new.c | |||
@@ -420,7 +420,7 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, | |||
420 | s->transmit_cont = cont; | 420 | s->transmit_cont = cont; |
421 | s->transmit_cont_cls = cont_cls; | 421 | s->transmit_cont_cls = cont_cls; |
422 | s->next = NULL; | 422 | s->next = NULL; |
423 | s->delay = GNUNET_TIME_absolute_get_forever(); | 423 | s->next_receive = GNUNET_TIME_absolute_get_forever(); |
424 | return s; | 424 | return s; |
425 | } | 425 | } |
426 | 426 | ||
@@ -487,7 +487,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
487 | int res = GNUNET_SYSERR; | 487 | int res = GNUNET_SYSERR; |
488 | 488 | ||
489 | #if DEBUG_HTTP | 489 | #if DEBUG_HTTP |
490 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 490 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
491 | "Sending %u bytes to peer `%s' on address `%s' %X %i\n", msgbuf_size, | 491 | "Sending %u bytes to peer `%s' on address `%s' %X %i\n", msgbuf_size, |
492 | GNUNET_i2s (target), ((addr != NULL) && (addrlen != 0)) ? http_plugin_address_to_string(plugin, addr, addrlen) : "<inbound>", session, force_address); | 492 | GNUNET_i2s (target), ((addr != NULL) && (addrlen != 0)) ? http_plugin_address_to_string(plugin, addr, addrlen) : "<inbound>", session, force_address); |
493 | #endif | 493 | #endif |
@@ -497,7 +497,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
497 | /* look for existing connection */ | 497 | /* look for existing connection */ |
498 | s = lookup_session (plugin, target, session, addr, addrlen, 1); | 498 | s = lookup_session (plugin, target, session, addr, addrlen, 1); |
499 | #if DEBUG_HTTP | 499 | #if DEBUG_HTTP |
500 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 500 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
501 | "%s existing session: %s\n", (s!=NULL) ? "Found" : "NOT Found", ((s != NULL) && (s->inbound == GNUNET_YES)) ? "inbound" : "outbound"); | 501 | "%s existing session: %s\n", (s!=NULL) ? "Found" : "NOT Found", ((s != NULL) && (s->inbound == GNUNET_YES)) ? "inbound" : "outbound"); |
502 | #endif | 502 | #endif |
503 | 503 | ||
@@ -514,7 +514,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
514 | } | 514 | } |
515 | 515 | ||
516 | #if DEBUG_HTTP | 516 | #if DEBUG_HTTP |
517 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 517 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
518 | "Initiiating new connection to peer `%s'\n", | 518 | "Initiiating new connection to peer `%s'\n", |
519 | GNUNET_i2s (target)); | 519 | GNUNET_i2s (target)); |
520 | #endif | 520 | #endif |
@@ -541,7 +541,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
541 | if (s->inbound == GNUNET_NO) | 541 | if (s->inbound == GNUNET_NO) |
542 | { | 542 | { |
543 | #if DEBUG_HTTP | 543 | #if DEBUG_HTTP |
544 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 544 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
545 | "Using outbound client session to send to `%s'\n", | 545 | "Using outbound client session to send to `%s'\n", |
546 | GNUNET_i2s (target)); | 546 | GNUNET_i2s (target)); |
547 | #endif | 547 | #endif |
@@ -553,7 +553,7 @@ http_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
553 | server_send (s, msg); | 553 | server_send (s, msg); |
554 | res = msgbuf_size; | 554 | res = msgbuf_size; |
555 | #if DEBUG_HTTP | 555 | #if DEBUG_HTTP |
556 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 556 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
557 | "Using inbound server session to send to `%s'\n", | 557 | "Using inbound server session to send to `%s'\n", |
558 | GNUNET_i2s (target)); | 558 | GNUNET_i2s (target)); |
559 | #endif | 559 | #endif |
@@ -754,7 +754,9 @@ nat_port_map_callback (void *cls, int add_remove, const struct sockaddr *addr, | |||
754 | socklen_t addrlen) | 754 | socklen_t addrlen) |
755 | { | 755 | { |
756 | GNUNET_assert (cls != NULL); | 756 | GNUNET_assert (cls != NULL); |
757 | #if DEBUG_HTTP | ||
757 | struct Plugin *plugin = cls; | 758 | struct Plugin *plugin = cls; |
759 | #endif | ||
758 | static int limit; | 760 | static int limit; |
759 | #if DEBUG_HTTP | 761 | #if DEBUG_HTTP |
760 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 762 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
@@ -790,7 +792,7 @@ start_report_addresses (struct Plugin *plugin) | |||
790 | GNUNET_SERVICE_get_server_addresses (plugin->name, plugin->env->cfg, | 792 | GNUNET_SERVICE_get_server_addresses (plugin->name, plugin->env->cfg, |
791 | &addrs, &addrlens); | 793 | &addrs, &addrlens); |
792 | #if 0 | 794 | #if 0 |
793 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, | 795 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
794 | _("FOUND %u addresses\n"),res); | 796 | _("FOUND %u addresses\n"),res); |
795 | #endif | 797 | #endif |
796 | 798 | ||
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index 596ac4925..6781b0745 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -242,16 +242,16 @@ server_receive_mst_cb (void *cls, void *client, | |||
242 | const struct GNUNET_MessageHeader *message) | 242 | const struct GNUNET_MessageHeader *message) |
243 | { | 243 | { |
244 | struct Session *s = cls; | 244 | struct Session *s = cls; |
245 | #if VERBOSE_SERVER | ||
245 | struct Plugin *plugin = s->plugin; | 246 | struct Plugin *plugin = s->plugin; |
247 | #endif | ||
246 | struct GNUNET_TIME_Relative delay; | 248 | struct GNUNET_TIME_Relative delay; |
247 | 249 | ||
248 | delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); | 250 | delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); |
249 | 251 | ||
250 | s->delay = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), delay); | 252 | s->next_receive = GNUNET_TIME_absolute_add(GNUNET_TIME_absolute_get(), delay); |
251 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Server: SERVER DELAY %llu ms\n", | ||
252 | delay.rel_value); | ||
253 | 253 | ||
254 | if (GNUNET_TIME_absolute_get().abs_value < s->delay.abs_value) | 254 | if (delay.rel_value > 0) |
255 | { | 255 | { |
256 | #if VERBOSE_CLIENT | 256 | #if VERBOSE_CLIENT |
257 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Server: peer `%s' address `%s' next read delayed for %llu ms\n", | 257 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, "Server: peer `%s' address `%s' next read delayed for %llu ms\n", |
@@ -272,7 +272,7 @@ static ssize_t | |||
272 | server_send_callback (void *cls, uint64_t pos, char *buf, size_t max) | 272 | server_send_callback (void *cls, uint64_t pos, char *buf, size_t max) |
273 | { | 273 | { |
274 | struct Session *s = cls; | 274 | struct Session *s = cls; |
275 | struct Plugin *plugin = s->plugin; | 275 | |
276 | struct HTTP_Message *msg; | 276 | struct HTTP_Message *msg; |
277 | int bytes_read = 0; | 277 | int bytes_read = 0; |
278 | //static int c = 0; | 278 | //static int c = 0; |
@@ -304,6 +304,7 @@ server_send_callback (void *cls, uint64_t pos, char *buf, size_t max) | |||
304 | } | 304 | } |
305 | 305 | ||
306 | #if VERBOSE_CLIENT | 306 | #if VERBOSE_CLIENT |
307 | struct Plugin *plugin = s->plugin; | ||
307 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 308 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
308 | "Server: %X: sent %u bytes\n", | 309 | "Server: %X: sent %u bytes\n", |
309 | s, bytes_read); | 310 | s, bytes_read); |
@@ -324,6 +325,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection, | |||
324 | const char *upload_data, size_t * upload_data_size, | 325 | const char *upload_data, size_t * upload_data_size, |
325 | void **httpSessionCache) | 326 | void **httpSessionCache) |
326 | { | 327 | { |
328 | |||
327 | struct Plugin *plugin = cls; | 329 | struct Plugin *plugin = cls; |
328 | struct ServerConnection *sc = *httpSessionCache; | 330 | struct ServerConnection *sc = *httpSessionCache; |
329 | struct Session *s = NULL; | 331 | struct Session *s = NULL; |
@@ -477,7 +479,7 @@ create: | |||
477 | NULL); | 479 | NULL); |
478 | 480 | ||
479 | s->inbound = GNUNET_YES; | 481 | s->inbound = GNUNET_YES; |
480 | s->delay = GNUNET_TIME_absolute_get_zero(); | 482 | s->next_receive = GNUNET_TIME_absolute_get_zero(); |
481 | s->tag= tag; | 483 | s->tag= tag; |
482 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) | 484 | if (0 == strcmp (MHD_HTTP_METHOD_PUT, method)) |
483 | s->server_recv = s; | 485 | s->server_recv = s; |
@@ -563,7 +565,7 @@ found: | |||
563 | GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen), *upload_data_size); | 565 | GNUNET_i2s (&s->target), GNUNET_a2s (s->addr, s->addrlen), *upload_data_size); |
564 | #endif | 566 | #endif |
565 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get(); | 567 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get(); |
566 | if (( s->delay.abs_value < now.abs_value)) | 568 | if (( s->next_receive.abs_value <= now.abs_value)) |
567 | { | 569 | { |
568 | #if VERBOSE_SERVER | 570 | #if VERBOSE_SERVER |
569 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 571 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
@@ -575,19 +577,18 @@ found: | |||
575 | s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); | 577 | s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); |
576 | } | 578 | } |
577 | res = GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, *upload_data_size, GNUNET_NO, GNUNET_NO); | 579 | res = GNUNET_SERVER_mst_receive (s->msg_tk, s, upload_data, *upload_data_size, GNUNET_NO, GNUNET_NO); |
580 | #if VERBOSE_SERVER | ||
578 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 581 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
579 | "Server: Received %Zu bytes\n", | 582 | "Server: Received %Zu bytes\n", *upload_data_size); |
580 | *upload_data_size); | 583 | #endif |
581 | (*upload_data_size) = 0; | 584 | (*upload_data_size) = 0; |
582 | } | 585 | } |
583 | else | 586 | else |
584 | { | 587 | { |
585 | |||
586 | #if DEBUG_HTTP | 588 | #if DEBUG_HTTP |
587 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 589 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
588 | "Connection %X: no inbound bandwidth available! Next read was delayed by %llu ms\n", s, now.abs_value - s->delay.abs_value); | 590 | "Server: %X no inbound bandwidth available! Next read was delayed by %llu ms\n", s, now.abs_value - s->next_receive.abs_value); |
589 | #endif | 591 | #endif |
590 | |||
591 | } | 592 | } |
592 | return MHD_YES; | 593 | return MHD_YES; |
593 | } | 594 | } |