aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-02-14 11:25:25 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-02-14 11:25:25 +0000
commit107a20218f88dcd4f41869c233d89835fb9c1ac5 (patch)
treeb579d2eef1566a0fdf0115a9585eed6a5185a401 /src
parent63b1a7a11c47a878a7806be041cde9f046331896 (diff)
downloadgnunet-107a20218f88dcd4f41869c233d89835fb9c1ac5.tar.gz
gnunet-107a20218f88dcd4f41869c233d89835fb9c1ac5.zip
- fix logging to remove error messages
Diffstat (limited to 'src')
-rw-r--r--src/transport/plugin_transport_http_server.c104
1 files changed, 18 insertions, 86 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index e90b26f72..2e0084ff7 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -62,7 +62,7 @@ server_log (void *arg, const char *fmt, va_list ap)
62 62
63 vsnprintf (text, sizeof (text), fmt, ap); 63 vsnprintf (text, sizeof (text), fmt, ap);
64 va_end (ap); 64 va_end (ap);
65 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Server: %s\n", text); 65 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Server: %s\n", text);
66} 66}
67 67
68/** 68/**
@@ -156,11 +156,9 @@ server_load_certificate (struct Plugin *plugin)
156 } 156 }
157 157
158 /* read key & certificates from file */ 158 /* read key & certificates from file */
159#if VERBOSE_SERVER
160 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 159 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
161 "Loading TLS certificate from key-file `%s' cert-file`%s'\n", 160 "Loading TLS certificate from key-file `%s' cert-file`%s'\n",
162 key_file, cert_file); 161 key_file, cert_file);
163#endif
164 162
165 plugin->key = server_load_file (key_file); 163 plugin->key = server_load_file (key_file);
166 plugin->cert = server_load_file (cert_file); 164 plugin->cert = server_load_file (cert_file);
@@ -280,10 +278,7 @@ server_receive_mst_cb (void *cls, void *client,
280 const struct GNUNET_MessageHeader *message) 278 const struct GNUNET_MessageHeader *message)
281{ 279{
282 struct Session *s = cls; 280 struct Session *s = cls;
283
284#if VERBOSE_SERVER
285 struct Plugin *plugin = s->plugin; 281 struct Plugin *plugin = s->plugin;
286#endif
287 struct GNUNET_TIME_Relative delay; 282 struct GNUNET_TIME_Relative delay;
288 283
289 delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen); 284 delay = http_plugin_receive (s, &s->target, message, s, s->addr, s->addrlen);
@@ -293,13 +288,11 @@ server_receive_mst_cb (void *cls, void *client,
293 288
294 if (delay.rel_value > 0) 289 if (delay.rel_value > 0)
295 { 290 {
296#if VERBOSE_SERVER
297 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 291 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
298 "Server: peer `%s' address `%s' next read delayed for %llu ms\n", 292 "Server: peer `%s' address `%s' next read delayed for %llu ms\n",
299 GNUNET_i2s (&s->target), 293 GNUNET_i2s (&s->target),
300 http_plugin_address_to_string (NULL, s->addr, s->addrlen), 294 http_plugin_address_to_string (NULL, s->addr, s->addrlen),
301 delay); 295 delay);
302#endif
303 } 296 }
304} 297}
305 298
@@ -316,10 +309,6 @@ server_send_callback (void *cls, uint64_t pos, char *buf, size_t max)
316{ 309{
317 struct Session *s = cls; 310 struct Session *s = cls;
318 311
319#if VERBOSE_SERVER
320 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, s->plugin->name,
321 "Server: %X can sent maximum %u \n", s, max);
322#endif
323 struct HTTP_Message *msg; 312 struct HTTP_Message *msg;
324 int bytes_read = 0; 313 int bytes_read = 0;
325 314
@@ -351,12 +340,10 @@ server_send_callback (void *cls, uint64_t pos, char *buf, size_t max)
351 } 340 }
352 } 341 }
353 342
354#if VERBOSE_SERVER
355 struct Plugin *plugin = s->plugin; 343 struct Plugin *plugin = s->plugin;
356 344 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
357 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
358 "Server: %X: sent %u bytes\n", s, bytes_read); 345 "Server: %X: sent %u bytes\n", s, bytes_read);
359#endif 346
360 return bytes_read; 347 return bytes_read;
361} 348}
362 349
@@ -420,12 +407,9 @@ server_lookup_session (struct Plugin *plugin,
420 goto error; 407 goto error;
421 408
422 plugin->cur_connections++; 409 plugin->cur_connections++;
423
424#if VERBOSE_SERVER
425 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 410 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
426 "Server: New inbound connection from %s with tag %u\n", 411 "Server: New inbound connection from %s with tag %u\n",
427 GNUNET_i2s (&target), tag); 412 GNUNET_i2s (&target), tag);
428#endif
429 /* find duplicate session */ 413 /* find duplicate session */
430 414
431 t = plugin->head; 415 t = plugin->head;
@@ -442,11 +426,9 @@ server_lookup_session (struct Plugin *plugin,
442 } 426 }
443 if (t != NULL) 427 if (t != NULL)
444 { 428 {
445#if VERBOSE_SERVER
446 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 429 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
447 "Server: Duplicate session, dismissing new connection from peer `%s'\n", 430 "Server: Duplicate session, dismissing new connection from peer `%s'\n",
448 GNUNET_i2s (&target)); 431 GNUNET_i2s (&target));
449#endif
450 goto error; 432 goto error;
451 } 433 }
452 434
@@ -466,20 +448,15 @@ server_lookup_session (struct Plugin *plugin,
466 448
467 if (t == NULL) 449 if (t == NULL)
468 goto create; 450 goto create;
469
470#if VERBOSE_SERVER
471 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 451 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
472 "Server: Found existing semi-session for `%s'\n", 452 "Server: Found existing semi-session for `%s'\n",
473 GNUNET_i2s (&target)); 453 GNUNET_i2s (&target));
474#endif
475 454
476 if ((direction == _SEND) && (t->server_send != NULL)) 455 if ((direction == _SEND) && (t->server_send != NULL))
477 { 456 {
478#if VERBOSE_SERVER
479 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 457 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
480 "Server: Duplicate GET session, dismissing new connection from peer `%s'\n", 458 "Server: Duplicate GET session, dismissing new connection from peer `%s'\n",
481 GNUNET_i2s (&target)); 459 GNUNET_i2s (&target));
482#endif
483 goto error; 460 goto error;
484 } 461 }
485 else 462 else
@@ -488,21 +465,17 @@ server_lookup_session (struct Plugin *plugin,
488 GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head, 465 GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head,
489 plugin->server_semi_tail, s); 466 plugin->server_semi_tail, s);
490 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s); 467 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
491#if VERBOSE_SERVER
492 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 468 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
493 "Server: Found matching semi-session, merging session for peer `%s'\n", 469 "Server: Found matching semi-session, merging session for peer `%s'\n",
494 GNUNET_i2s (&target)); 470 GNUNET_i2s (&target));
495#endif
496 471
497 goto found; 472 goto found;
498 } 473 }
499 if ((direction == _RECEIVE) && (t->server_recv != NULL)) 474 if ((direction == _RECEIVE) && (t->server_recv != NULL))
500 { 475 {
501#if VERBOSE_SERVER
502 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 476 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
503 "Server: Duplicate PUT session, dismissing new connection from peer `%s'\n", 477 "Server: Duplicate PUT session, dismissing new connection from peer `%s'\n",
504 GNUNET_i2s (&target)); 478 GNUNET_i2s (&target));
505#endif
506 goto error; 479 goto error;
507 } 480 }
508 else 481 else
@@ -511,23 +484,17 @@ server_lookup_session (struct Plugin *plugin,
511 GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head, 484 GNUNET_CONTAINER_DLL_remove (plugin->server_semi_head,
512 plugin->server_semi_tail, s); 485 plugin->server_semi_tail, s);
513 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s); 486 GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
514#if VERBOSE_SERVER
515 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 487 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
516 "Server: Found matching semi-session, merging session for peer `%s'\n", 488 "Server: Found matching semi-session, merging session for peer `%s'\n",
517 GNUNET_i2s (&target)); 489 GNUNET_i2s (&target));
518#endif
519 goto found; 490 goto found;
520 } 491 }
521 492
522create: 493create:
523/* create new session */ 494/* create new session */
524#if VERBOSE_SERVER
525 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 495 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
526 "Server: Creating new session for peer `%s' \n", 496 "Server: Creating new session for peer `%s' \n",
527 GNUNET_i2s (&target)); 497 GNUNET_i2s (&target));
528#endif
529
530
531 switch (conn_info->client_addr->sa_family) 498 switch (conn_info->client_addr->sa_family)
532 { 499 {
533 case (AF_INET): 500 case (AF_INET):
@@ -565,10 +532,8 @@ create:
565 goto found; 532 goto found;
566 533
567error: 534error:
568#if VERBOSE_SERVER
569 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 535 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
570 "Server: Invalid connection request\n"); 536 "Server: Invalid connection request\n");
571#endif
572 return NULL; 537 return NULL;
573 538
574found: 539found:
@@ -584,10 +549,8 @@ found:
584#if MHD_VERSION >= 0x00090E00 549#if MHD_VERSION >= 0x00090E00
585 int to = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000); 550 int to = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000);
586 551
587#if VERBOSE_SERVER
588 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 552 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
589 "Server: Setting timeout for %X to %u sec.\n", sc, to); 553 "Server: Setting timeout for %X to %u sec.\n", sc, to);
590#endif
591 MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, to); 554 MHD_set_connection_option (mhd_connection, MHD_CONNECTION_OPTION_TIMEOUT, to);
592 555
593 struct MHD_Daemon *d = NULL; 556 struct MHD_Daemon *d = NULL;
@@ -648,14 +611,11 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
648 /* connection is to be disconnected */ 611 /* connection is to be disconnected */
649 if (sc->disconnect == GNUNET_YES) 612 if (sc->disconnect == GNUNET_YES)
650 { 613 {
614 /* Sent HTTP/1.1: 200 OK as PUT Response\ */
651 response = 615 response =
652 MHD_create_response_from_data (strlen ("Thank you!"), "Thank you!", 616 MHD_create_response_from_data (strlen ("Thank you!"), "Thank you!",
653 MHD_NO, MHD_NO); 617 MHD_NO, MHD_NO);
654 res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); 618 res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
655#if VERBOSE_SERVER
656 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
657 "Sent HTTP/1.1: 200 OK as PUT Response\n");
658#endif
659 MHD_destroy_response (response); 619 MHD_destroy_response (response);
660 return MHD_YES; 620 return MHD_YES;
661 } 621 }
@@ -664,12 +624,7 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
664 /* Check if both directions are connected */ 624 /* Check if both directions are connected */
665 if ((sc->session->server_recv == NULL) || (sc->session->server_send == NULL)) 625 if ((sc->session->server_recv == NULL) || (sc->session->server_send == NULL))
666 { 626 {
667#if VERBOSE_SERVER 627 /* Delayed read from since not both semi-connections are connected */
668 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
669 "Server: Delayed read from `%s' `%s' since not both semi-connections are connected\n",
670 GNUNET_i2s (&s->target),
671 http_plugin_address_to_string (NULL, s->addr, s->addrlen));
672#endif
673 return MHD_YES; 628 return MHD_YES;
674 } 629 }
675 630
@@ -686,36 +641,30 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
686 { 641 {
687 if (*upload_data_size == 0) 642 if (*upload_data_size == 0)
688 { 643 {
689#if VERBOSE_SERVER
690 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 644 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
691 "Server: Peer `%s' PUT on address `%s' connected\n", 645 "Server: Peer `%s' PUT on address `%s' connected\n",
692 GNUNET_i2s (&s->target), 646 GNUNET_i2s (&s->target),
693 http_plugin_address_to_string (NULL, s->addr, 647 http_plugin_address_to_string (NULL, s->addr,
694 s->addrlen)); 648 s->addrlen));
695#endif
696 return MHD_YES; 649 return MHD_YES;
697 } 650 }
698 651
699 /* Receiving data */ 652 /* Receiving data */
700 if ((*upload_data_size > 0)) 653 if ((*upload_data_size > 0))
701 { 654 {
702#if VERBOSE_SERVER
703 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 655 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
704 "Server: peer `%s' PUT on address `%s' received %u bytes\n", 656 "Server: peer `%s' PUT on address `%s' received %u bytes\n",
705 GNUNET_i2s (&s->target), 657 GNUNET_i2s (&s->target),
706 http_plugin_address_to_string (NULL, s->addr, 658 http_plugin_address_to_string (NULL, s->addr,
707 s->addrlen), 659 s->addrlen),
708 *upload_data_size); 660 *upload_data_size);
709#endif
710 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); 661 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
711 662
712 if ((s->next_receive.abs_value <= now.abs_value)) 663 if ((s->next_receive.abs_value <= now.abs_value))
713 { 664 {
714#if VERBOSE_SERVER
715 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 665 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
716 "Server: %X: PUT with %u bytes forwarded to MST\n", s, 666 "Server: %X: PUT with %u bytes forwarded to MST\n", s,
717 *upload_data_size); 667 *upload_data_size);
718#endif
719 if (s->msg_tk == NULL) 668 if (s->msg_tk == NULL)
720 { 669 {
721 s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s); 670 s->msg_tk = GNUNET_SERVER_mst_create (&server_receive_mst_cb, s);
@@ -727,31 +676,24 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
727 int to = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000); 676 int to = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value / 1000);
728 struct ServerConnection *t = NULL; 677 struct ServerConnection *t = NULL;
729 678
730#if VERBOSE_SERVER
731 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 679 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
732 "Server: Received %u bytes\n", *upload_data_size); 680 "Server: Received %u bytes\n", *upload_data_size);
733#endif
734
735 /* Setting timeouts for other connections */ 681 /* Setting timeouts for other connections */
736 if (s->server_recv != NULL) 682 if (s->server_recv != NULL)
737 { 683 {
738 t = s->server_recv; 684 t = s->server_recv;
739#if VERBOSE_SERVER
740 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 685 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
741 "Server: Setting timeout for %X to %u sec.\n", t, 686 "Server: Setting timeout for %X to %u sec.\n", t,
742 to); 687 to);
743#endif
744 MHD_set_connection_option (t->mhd_conn, MHD_CONNECTION_OPTION_TIMEOUT, 688 MHD_set_connection_option (t->mhd_conn, MHD_CONNECTION_OPTION_TIMEOUT,
745 to); 689 to);
746 } 690 }
747 if (s->server_send != NULL) 691 if (s->server_send != NULL)
748 { 692 {
749 t = s->server_send; 693 t = s->server_send;
750#if VERBOSE_SERVER
751 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 694 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
752 "Server: Setting timeout for %X to %u sec.\n", t, 695 "Server: Setting timeout for %X to %u sec.\n", t,
753 to); 696 to);
754#endif
755 MHD_set_connection_option (t->mhd_conn, MHD_CONNECTION_OPTION_TIMEOUT, 697 MHD_set_connection_option (t->mhd_conn, MHD_CONNECTION_OPTION_TIMEOUT,
756 to); 698 to);
757 } 699 }
@@ -767,11 +709,9 @@ server_access_cb (void *cls, struct MHD_Connection *mhd_connection,
767 } 709 }
768 else 710 else
769 { 711 {
770#if DEBUG_HTTP
771 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 712 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
772 "Server: %X no inbound bandwidth available! Next read was delayed by %llu ms\n", 713 "Server: %X no inbound bandwidth available! Next read was delayed by %llu ms\n",
773 s, now.abs_value - s->next_receive.abs_value); 714 s, now.abs_value - s->next_receive.abs_value);
774#endif
775 } 715 }
776 return MHD_YES; 716 return MHD_YES;
777 } 717 }
@@ -798,12 +738,12 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
798 plugin = s->plugin; 738 plugin = s->plugin;
799 if (sc->direction == _SEND) 739 if (sc->direction == _SEND)
800 { 740 {
801#if VERBOSE_SERVER 741
802 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 742 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
803 "Server: %X peer `%s' GET on address `%s' disconnected\n", 743 "Server: %X peer `%s' GET on address `%s' disconnected\n",
804 s->server_send, GNUNET_i2s (&s->target), 744 s->server_send, GNUNET_i2s (&s->target),
805 http_plugin_address_to_string (NULL, s->addr, s->addrlen)); 745 http_plugin_address_to_string (NULL, s->addr, s->addrlen));
806#endif 746
807 s->server_send = NULL; 747 s->server_send = NULL;
808 748
809 if (s->server_recv != NULL) 749 if (s->server_recv != NULL)
@@ -818,12 +758,10 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
818 } 758 }
819 if (sc->direction == _RECEIVE) 759 if (sc->direction == _RECEIVE)
820 { 760 {
821#if VERBOSE_SERVER 761 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
822 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name,
823 "Server: %X peer `%s' PUT on address `%s' disconnected\n", 762 "Server: %X peer `%s' PUT on address `%s' disconnected\n",
824 s->server_recv, GNUNET_i2s (&s->target), 763 s->server_recv, GNUNET_i2s (&s->target),
825 http_plugin_address_to_string (NULL, s->addr, s->addrlen)); 764 http_plugin_address_to_string (NULL, s->addr, s->addrlen));
826#endif
827 s->server_recv = NULL; 765 s->server_recv = NULL;
828 if (s->server_send != NULL) 766 if (s->server_send != NULL)
829 { 767 {
@@ -866,12 +804,10 @@ server_disconnect_cb (void *cls, struct MHD_Connection *connection,
866 804
867 if ((s->server_send == NULL) && (s->server_recv == NULL)) 805 if ((s->server_send == NULL) && (s->server_recv == NULL))
868 { 806 {
869#if VERBOSE_SERVER
870 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, 807 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
871 "Server: peer `%s' on address `%s' disconnected\n", 808 "Server: peer `%s' on address `%s' disconnected\n",
872 GNUNET_i2s (&s->target), 809 GNUNET_i2s (&s->target),
873 http_plugin_address_to_string (NULL, s->addr, s->addrlen)); 810 http_plugin_address_to_string (NULL, s->addr, s->addrlen));
874#endif
875 if (s->msg_tk != NULL) 811 if (s->msg_tk != NULL)
876 { 812 {
877 GNUNET_SERVER_mst_destroy (s->msg_tk); 813 GNUNET_SERVER_mst_destroy (s->msg_tk);
@@ -943,10 +879,10 @@ server_v4_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
943 879
944 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 880 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
945 return; 881 return;
946#if VERBOSE_SERVER 882
947 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 883 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
948 "Running IPv4 server\n"); 884 "Running IPv4 server\n");
949#endif 885
950 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v4)); 886 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v4));
951 if (plugin->server_v4 != NULL) 887 if (plugin->server_v4 != NULL)
952 plugin->server_v4_task = 888 plugin->server_v4_task =
@@ -971,10 +907,10 @@ server_v6_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
971 907
972 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 908 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
973 return; 909 return;
974#if VERBOSE_SERVER 910
975 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 911 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
976 "Running IPv6 server\n"); 912 "Running IPv6 server\n");
977#endif 913
978 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v6)); 914 GNUNET_assert (MHD_YES == MHD_run (plugin->server_v6));
979 if (plugin->server_v6 != NULL) 915 if (plugin->server_v6 != NULL)
980 plugin->server_v6_task = 916 plugin->server_v6_task =
@@ -1046,7 +982,7 @@ server_schedule (struct Plugin *plugin, struct MHD_Daemon *daemon_handle,
1046 plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK; 982 plugin->server_v4_task = GNUNET_SCHEDULER_NO_TASK;
1047 } 983 }
1048#if VERBOSE_SERVER 984#if VERBOSE_SERVER
1049 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 985 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
1050 "Scheduling IPv4 server task in %llu ms\n", tv); 986 "Scheduling IPv4 server task in %llu ms\n", tv);
1051#endif 987#endif
1052 ret = 988 ret =
@@ -1062,7 +998,7 @@ server_schedule (struct Plugin *plugin, struct MHD_Daemon *daemon_handle,
1062 plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK; 998 plugin->server_v6_task = GNUNET_SCHEDULER_NO_TASK;
1063 } 999 }
1064#if VERBOSE_SERVER 1000#if VERBOSE_SERVER
1065 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 1001 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
1066 "Scheduling IPv6 server task in %llu ms\n", tv); 1002 "Scheduling IPv6 server task in %llu ms\n", tv);
1067#endif 1003#endif
1068 ret = 1004 ret =
@@ -1213,10 +1149,6 @@ server_stop (struct Plugin *plugin)
1213 struct Session *s = NULL; 1149 struct Session *s = NULL;
1214 struct Session *t = NULL; 1150 struct Session *t = NULL;
1215 1151
1216#if VERBOSE_SERVER
1217 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, "server_stop\n");
1218#endif
1219
1220 struct MHD_Daemon *server_v4_tmp = plugin->server_v4; 1152 struct MHD_Daemon *server_v4_tmp = plugin->server_v4;
1221 1153
1222 plugin->server_v4 = NULL; 1154 plugin->server_v4 = NULL;
@@ -1250,7 +1182,7 @@ server_stop (struct Plugin *plugin)
1250 while (s != NULL) 1182 while (s != NULL)
1251 { 1183 {
1252#if VERBOSE_SERVER 1184#if VERBOSE_SERVER
1253 GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, plugin->name, 1185 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name,
1254 "Deleting semi-sessions %p\n", s); 1186 "Deleting semi-sessions %p\n", s);
1255#endif 1187#endif
1256 t = s->next; 1188 t = s->next;