aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2015-04-27 19:16:01 +0000
committerBart Polot <bart@net.in.tum.de>2015-04-27 19:16:01 +0000
commitb0963a5108cd2a95cb862a1ac061892f68d7bba4 (patch)
treeda43b3a0e3ef58ffde95d85003efef4e4a1cdf07 /src/cadet/gnunet-service-cadet_channel.c
parentfcc1e5ec182931c63608b59f7f2ae8053538003c (diff)
downloadgnunet-b0963a5108cd2a95cb862a1ac061892f68d7bba4.tar.gz
gnunet-b0963a5108cd2a95cb862a1ac061892f68d7bba4.zip
- skip checking all messages that are not there, no matter what the bitfield says
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 2fd0a8e09..e529f8ecb 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1060,15 +1060,18 @@ channel_rel_free_sent (struct CadetChannelReliability *rel,
1060 /* Did we run out of copies? (previously freed, it's ok) */ 1060 /* Did we run out of copies? (previously freed, it's ok) */
1061 if (NULL == copy) 1061 if (NULL == copy)
1062 { 1062 {
1063 LOG (GNUNET_ERROR_TYPE_DEBUG, "run out of copies...\n"); 1063 LOG (GNUNET_ERROR_TYPE_DEBUG, "run out of copies...\n");
1064 return; 1064 return;
1065 } 1065 }
1066 1066
1067 /* Did we overshoot the target? (previously freed, it's ok) */ 1067 /* Did we overshoot the target? (previously freed, it's ok) */
1068 if (GC_is_pid_bigger (copy->mid, target)) 1068 if (GC_is_pid_bigger (copy->mid, target))
1069 { 1069 {
1070 LOG (GNUNET_ERROR_TYPE_DEBUG, " next copy %u\n", copy->mid); 1070 LOG (GNUNET_ERROR_TYPE_DEBUG, " next copy %u\n", copy->mid);
1071 continue; 1071 i += copy->mid - target - 1; /* MID: 90, t = 85, i += 4 (i++ later) */
1072 mask = (0x1LL << (i + 1)) - 1; /* Mask = i-th bit and all before */
1073 bitfield &= ~mask;
1074 continue;
1072 } 1075 }
1073 1076
1074 /* Now copy->mid == target, free it */ 1077 /* Now copy->mid == target, free it */