aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-02-26 18:49:17 +0000
committerng0 <ng0@n0.is>2019-02-26 18:49:17 +0000
commit0aca77d11fc5fe69f851e35c887e18ccb8fa60e5 (patch)
tree7e10fa2e3909708837451a8eb5490e630264928c
parentd063c42229369226b20df98079c39b23c33cae8f (diff)
parent04a3eab73f8fdeb520ace483b46c636cc7107cd3 (diff)
downloadgnunet-0aca77d11fc5fe69f851e35c887e18ccb8fa60e5.tar.gz
gnunet-0aca77d11fc5fe69f851e35c887e18ccb8fa60e5.zip
Merge branch 'master' of gnunet.org:gnunet
-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);