diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-05 00:53:43 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-05 00:53:43 +0000 |
commit | b4f43f77d90fdef213fbb4f7740a929185484756 (patch) | |
tree | ed5a938d1f4e82e46922c073bcc7517eb94bc3d3 /src | |
parent | e2a0ac9c58f2121c1bf38dde636504db9775bab7 (diff) | |
download | gnunet-b4f43f77d90fdef213fbb4f7740a929185484756.tar.gz gnunet-b4f43f77d90fdef213fbb4f7740a929185484756.zip |
- log
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh_channel.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mesh/gnunet-service-mesh_channel.c b/src/mesh/gnunet-service-mesh_channel.c index 9bc8646bf..2c27ac675 100644 --- a/src/mesh/gnunet-service-mesh_channel.c +++ b/src/mesh/gnunet-service-mesh_channel.c | |||
@@ -709,27 +709,36 @@ ch_message_sent (void *cls, | |||
709 | switch (ch_q->type) | 709 | switch (ch_q->type) |
710 | { | 710 | { |
711 | case GNUNET_MESSAGE_TYPE_MESH_DATA: | 711 | case GNUNET_MESSAGE_TYPE_MESH_DATA: |
712 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT %u %s (c: %p, q: %p)\n", | 712 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT DATA MID %u\n", copy->mid); |
713 | copy->mid, GM_m2s (type), copy, copy->q); | ||
714 | GNUNET_assert (ch_q == copy->q); | 713 | GNUNET_assert (ch_q == copy->q); |
715 | copy->timestamp = GNUNET_TIME_absolute_get (); | 714 | copy->timestamp = GNUNET_TIME_absolute_get (); |
716 | rel = copy->rel; | 715 | rel = copy->rel; |
717 | if (GNUNET_SCHEDULER_NO_TASK == rel->retry_task) | 716 | if (GNUNET_SCHEDULER_NO_TASK == rel->retry_task) |
718 | { | 717 | { |
718 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!! scheduling retry %u\n"); | ||
719 | if (0 != rel->expected_delay.rel_value_us) | 719 | if (0 != rel->expected_delay.rel_value_us) |
720 | { | 720 | { |
721 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!! delay != 0\n"); | ||
721 | rel->retry_timer = | 722 | rel->retry_timer = |
722 | GNUNET_TIME_relative_multiply (rel->expected_delay, | 723 | GNUNET_TIME_relative_multiply (rel->expected_delay, |
723 | MESH_RETRANSMIT_MARGIN); | 724 | MESH_RETRANSMIT_MARGIN); |
724 | } | 725 | } |
725 | else | 726 | else |
726 | { | 727 | { |
728 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!! delay 0\n"); | ||
727 | rel->retry_timer = MESH_RETRANSMIT_TIME; | 729 | rel->retry_timer = MESH_RETRANSMIT_TIME; |
728 | } | 730 | } |
731 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!! using delay %s\n", | ||
732 | GNUNET_STRINGS_relative_time_to_string (rel->retry_timer, | ||
733 | GNUNET_NO)); | ||
729 | rel->retry_task = | 734 | rel->retry_task = |
730 | GNUNET_SCHEDULER_add_delayed (rel->retry_timer, | 735 | GNUNET_SCHEDULER_add_delayed (rel->retry_timer, |
731 | &channel_retransmit_message, rel); | 736 | &channel_retransmit_message, rel); |
732 | } | 737 | } |
738 | else | ||
739 | { | ||
740 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!! retry task %u\n", rel->retry_task); | ||
741 | } | ||
733 | copy->q = NULL; | 742 | copy->q = NULL; |
734 | break; | 743 | break; |
735 | 744 | ||
@@ -737,7 +746,7 @@ ch_message_sent (void *cls, | |||
737 | case GNUNET_MESSAGE_TYPE_MESH_DATA_ACK: | 746 | case GNUNET_MESSAGE_TYPE_MESH_DATA_ACK: |
738 | case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE: | 747 | case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_CREATE: |
739 | case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK: | 748 | case GNUNET_MESSAGE_TYPE_MESH_CHANNEL_ACK: |
740 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT %s\n", GM_m2s (type)); | 749 | LOG (GNUNET_ERROR_TYPE_DEBUG, "!!! SENT %s\n", GM_m2s (ch_q->type)); |
741 | rel = ch_q->rel; | 750 | rel = ch_q->rel; |
742 | GNUNET_assert (rel->uniq == ch_q); | 751 | GNUNET_assert (rel->uniq == ch_q); |
743 | rel->uniq = NULL; | 752 | rel->uniq = NULL; |
@@ -1063,6 +1072,9 @@ channel_confirm (struct MeshChannel *ch, int fwd) | |||
1063 | 1072 | ||
1064 | rel = fwd ? ch->root_rel : ch->dest_rel; | 1073 | rel = fwd ? ch->root_rel : ch->dest_rel; |
1065 | rel->client_ready = GNUNET_YES; | 1074 | rel->client_ready = GNUNET_YES; |
1075 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
1076 | " !! retry timer confirm %s\n", | ||
1077 | GNUNET_STRINGS_relative_time_to_string (rel->retry_timer, GNUNET_NO)); | ||
1066 | rel->expected_delay = rel->retry_timer; | 1078 | rel->expected_delay = rel->retry_timer; |
1067 | if (GMT_get_connections_buffer (ch->t) > 0 || GMT_is_loopback (ch->t)) | 1079 | if (GMT_get_connections_buffer (ch->t) > 0 || GMT_is_loopback (ch->t)) |
1068 | send_client_ack (ch, fwd); | 1080 | send_client_ack (ch, fwd); |