aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-07-20 16:41:47 +0000
committerBart Polot <bart@net.in.tum.de>2015-07-20 16:41:47 +0000
commitd1488c2a63088547f70a725761871ff0e41a0fb3 (patch)
tree08740a1a2487d2c60e2d8b154b800efbbd583e99 /src/cadet/gnunet-service-cadet_channel.c
parenta5e12b53160fbf359dd469408c600f0eb976590b (diff)
downloadgnunet-d1488c2a63088547f70a725761871ff0e41a0fb3.tar.gz
gnunet-d1488c2a63088547f70a725761871ff0e41a0fb3.zip
- code formatting, logging
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 748d74d49..0b6a11599 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -820,14 +820,15 @@ ch_message_sent (void *cls,
820 rel = copy->rel; 820 rel = copy->rel;
821 if (NULL == rel->retry_task) 821 if (NULL == rel->retry_task)
822 { 822 {
823 LOG (GNUNET_ERROR_TYPE_DEBUG, " scheduling retry in 4 * %s\n", 823 LOG (GNUNET_ERROR_TYPE_DEBUG, " scheduling retry in %d * %s\n",
824 CADET_RETRANSMIT_MARGIN,
824 GNUNET_STRINGS_relative_time_to_string (rel->expected_delay, 825 GNUNET_STRINGS_relative_time_to_string (rel->expected_delay,
825 GNUNET_YES)); 826 GNUNET_YES));
826 if (0 != rel->expected_delay.rel_value_us) 827 if (0 != rel->expected_delay.rel_value_us)
827 { 828 {
828 rel->retry_timer = 829 rel->retry_timer =
829 GNUNET_TIME_relative_multiply (rel->expected_delay, 830 GNUNET_TIME_relative_multiply (rel->expected_delay,
830 CADET_RETRANSMIT_MARGIN); 831 CADET_RETRANSMIT_MARGIN);
831 } 832 }
832 else 833 else
833 { 834 {
@@ -1106,7 +1107,7 @@ rel_message_free (struct CadetReliableMessage *copy, int update_time)
1106 1107
1107 rel = copy->rel; 1108 rel = copy->rel;
1108 LOG (GNUNET_ERROR_TYPE_DEBUG, "Freeing %u\n", copy->mid); 1109 LOG (GNUNET_ERROR_TYPE_DEBUG, "Freeing %u\n", copy->mid);
1109 if (update_time) 1110 if (GNUNET_YES == update_time)
1110 { 1111 {
1111 time = GNUNET_TIME_absolute_get_duration (copy->timestamp); 1112 time = GNUNET_TIME_absolute_get_duration (copy->timestamp);
1112 if (0 == rel->expected_delay.rel_value_us) 1113 if (0 == rel->expected_delay.rel_value_us)
@@ -2054,16 +2055,13 @@ GCCH_handle_data_ack (struct CadetChannel *ch,
2054 GC_f2s (fwd), ack, msg->futures); 2055 GC_f2s (fwd), ack, msg->futures);
2055 2056
2056 if (GNUNET_YES == fwd) 2057 if (GNUNET_YES == fwd)
2057 {
2058 rel = ch->root_rel; 2058 rel = ch->root_rel;
2059 }
2060 else 2059 else
2061 {
2062 rel = ch->dest_rel; 2060 rel = ch->dest_rel;
2063 } 2061
2064 if (NULL == rel) 2062 if (NULL == rel)
2065 { 2063 {
2066 GNUNET_break_op (GNUNET_NO != ch->destroy); 2064 GNUNET_break (GNUNET_NO != ch->destroy);
2067 return; 2065 return;
2068 } 2066 }
2069 2067
@@ -2080,7 +2078,10 @@ GCCH_handle_data_ack (struct CadetChannel *ch,
2080 LOG (GNUNET_ERROR_TYPE_DEBUG, " id %u\n", copy->mid); 2078 LOG (GNUNET_ERROR_TYPE_DEBUG, " id %u\n", copy->mid);
2081 next = copy->next; 2079 next = copy->next;
2082 if (GNUNET_YES == rel_message_free (copy, GNUNET_YES)) 2080 if (GNUNET_YES == rel_message_free (copy, GNUNET_YES))
2081 {
2082 LOG (GNUNET_ERROR_TYPE_DEBUG, " channel destoyed\n");
2083 return; 2083 return;
2084 }
2084 } 2085 }
2085 2086
2086 /* ACK client if needed and possible */ 2087 /* ACK client if needed and possible */