aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_channel.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-02-26 19:12:08 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-02-26 19:12:08 +0100
commit04a3eab73f8fdeb520ace483b46c636cc7107cd3 (patch)
tree66ecb8fcc07d9508feb7cfb63c259a712d7e6d2f /src/cadet/gnunet-service-cadet_channel.c
parentd0edae1ca3c2ac703bfb2e9e73eb62b51c2216cb (diff)
downloadgnunet-04a3eab73f8fdeb520ace483b46c636cc7107cd3.tar.gz
gnunet-04a3eab73f8fdeb520ace483b46c636cc7107cd3.zip
check for ACKed MID
Diffstat (limited to 'src/cadet/gnunet-service-cadet_channel.c')
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 031da9e4d..905211e00 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1318,6 +1318,7 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
1318 ((msg->mid.mid == ch->mid_recv.mid) && 1318 ((msg->mid.mid == ch->mid_recv.mid) &&
1319 (GNUNET_YES == ch->reliable)) || 1319 (GNUNET_YES == ch->reliable)) ||
1320 ((GNUNET_NO == ch->reliable) && 1320 ((GNUNET_NO == ch->reliable) &&
1321 (msg->mid.mid >= ch->mid_recv.mid) &&
1321 ((NULL == ccc->head_recv) || 1322 ((NULL == ccc->head_recv) ||
1322 (msg->mid.mid < ccc->head_recv->mid.mid))) ) 1323 (msg->mid.mid < ccc->head_recv->mid.mid))) )
1323 { 1324 {
@@ -1416,11 +1417,12 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel *ch,
1416 next_msg); 1417 next_msg);
1417 ccc->num_recv--; 1418 ccc->num_recv--;
1418 /* Do not process duplicate MID */ 1419 /* Do not process duplicate MID */
1419 if (msg->mid.mid == next_msg->mid.mid) 1420 if ((msg->mid.mid == next_msg->mid.mid) || /* Duplicate */
1421 (msg->mid.mid < ch->mid_recv.mid)) /* Old */
1420 { 1422 {
1421 /* Duplicate within the queue, drop */ 1423 /* Duplicate within the queue, drop */
1422 LOG (GNUNET_ERROR_TYPE_DEBUG, 1424 LOG (GNUNET_ERROR_TYPE_DEBUG,
1423 "Duplicate message on %s (mid %u) dropped\n", 1425 "Message on %s (mid %u) dropped\n",
1424 GCCH_2s (ch), 1426 GCCH_2s (ch),
1425 ntohl (msg->mid.mid)); 1427 ntohl (msg->mid.mid));
1426 GNUNET_free (next_msg); 1428 GNUNET_free (next_msg);