diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-13 23:44:47 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-13 23:44:47 +0000 |
commit | c488f01c8ff0a6dc77f6b626cd3b40e6a64e0809 (patch) | |
tree | 9118e273acd053b24d42d3661158b83737b3a807 /src/core/gnunet-service-core_sessions.c | |
parent | d48352bb16b9cdf8b397d4b0a2154271f034edfe (diff) | |
download | gnunet-c488f01c8ff0a6dc77f6b626cd3b40e6a64e0809.tar.gz gnunet-c488f01c8ff0a6dc77f6b626cd3b40e6a64e0809.zip |
-more logging in try_transmission
Diffstat (limited to 'src/core/gnunet-service-core_sessions.c')
-rw-r--r-- | src/core/gnunet-service-core_sessions.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/core/gnunet-service-core_sessions.c b/src/core/gnunet-service-core_sessions.c index b57cd992f..83b1147b8 100644 --- a/src/core/gnunet-service-core_sessions.c +++ b/src/core/gnunet-service-core_sessions.c | |||
@@ -653,6 +653,13 @@ try_transmission (struct Session *session) | |||
653 | pos->deadline); | 653 | pos->deadline); |
654 | pos = pos->next; | 654 | pos = pos->next; |
655 | } | 655 | } |
656 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
657 | "Calculating transmission set with %u priority (%s) and %s earliest deadline\n", | ||
658 | maxp, | ||
659 | (GNUNET_YES == excess) ? "excess bandwidth" : "limited bandwidth", | ||
660 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_deadline), | ||
661 | GNUNET_YES)); | ||
662 | |||
656 | if (maxp < GNUNET_CORE_PRIO_CRITICAL_CONTROL) | 663 | if (maxp < GNUNET_CORE_PRIO_CRITICAL_CONTROL) |
657 | { | 664 | { |
658 | /* if highest already solicited priority from clients is not critical, | 665 | /* if highest already solicited priority from clients is not critical, |
@@ -672,6 +679,10 @@ try_transmission (struct Session *session) | |||
672 | /* we have messages waiting for solicitation that have a higher | 679 | /* we have messages waiting for solicitation that have a higher |
673 | priority than those that we already accepted; solicit the | 680 | priority than those that we already accepted; solicit the |
674 | high-priority messages first */ | 681 | high-priority messages first */ |
682 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
683 | "Soliciting messages based on priority (%u > %u)\n", | ||
684 | maxpc, | ||
685 | maxp); | ||
675 | solicit_messages (session, 0); | 686 | solicit_messages (session, 0); |
676 | return; | 687 | return; |
677 | } | 688 | } |
@@ -692,21 +703,34 @@ try_transmission (struct Session *session) | |||
692 | /* not enough ready yet (tiny message & cork possible), or no messages at all, | 703 | /* not enough ready yet (tiny message & cork possible), or no messages at all, |
693 | and either excess bandwidth or best-effort or higher message waiting at | 704 | and either excess bandwidth or best-effort or higher message waiting at |
694 | client; in this case, we try to solicit more */ | 705 | client; in this case, we try to solicit more */ |
706 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
707 | "Soliciting messages (excess %d, maxpc %d, message size %u, deadline %s)\n", | ||
708 | excess, | ||
709 | maxpc, | ||
710 | msize, | ||
711 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_deadline), | ||
712 | GNUNET_YES)); | ||
695 | solicit_messages (session, | 713 | solicit_messages (session, |
696 | msize); | 714 | msize); |
697 | if (msize > 0) | 715 | if (msize > 0) |
698 | { | 716 | { |
699 | /* if there is data to send, just not yet, make sure we do transmit | 717 | /* if there is data to send, just not yet, make sure we do transmit |
700 | * it once the deadline is reached */ | 718 | * it once the deadline is reached */ |
719 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
720 | "Corking until %s\n", | ||
721 | GNUNET_STRINGS_relative_time_to_string (GNUNET_TIME_absolute_get_remaining (min_deadline), | ||
722 | GNUNET_YES)); | ||
701 | if (GNUNET_SCHEDULER_NO_TASK != session->cork_task) | 723 | if (GNUNET_SCHEDULER_NO_TASK != session->cork_task) |
702 | GNUNET_SCHEDULER_cancel (session->cork_task); | 724 | GNUNET_SCHEDULER_cancel (session->cork_task); |
703 | session->cork_task = | 725 | session->cork_task = |
704 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining | 726 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining (min_deadline), |
705 | (min_deadline), &pop_cork_task, | 727 | &pop_cork_task, |
706 | session); | 728 | session); |
707 | } | 729 | } |
708 | return; | 730 | return; |
709 | } | 731 | } |
732 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
733 | "Building combined plaintext buffer to transmit message!\n"); | ||
710 | /* create plaintext buffer of all messages (that fit), encrypt and | 734 | /* create plaintext buffer of all messages (that fit), encrypt and |
711 | transmit */ | 735 | transmit */ |
712 | { | 736 | { |