gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: improve future calculations


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: improve future calculations if messages are skipped in unreliable in-order channels
Date: Tue, 26 Feb 2019 20:08:30 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 9787c2099 improve future calculations if messages are skipped in 
unreliable in-order channels
9787c2099 is described below

commit 9787c209921963ea60f1fdf5c8dc04a16cc344b3
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Feb 26 20:08:17 2019 +0100

    improve future calculations if messages are skipped in unreliable in-order 
channels
---
 src/cadet/gnunet-service-cadet_channel.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/cadet/gnunet-service-cadet_channel.c 
b/src/cadet/gnunet-service-cadet_channel.c
index 905211e00..10df917ff 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -1333,6 +1333,18 @@ GCCH_handle_channel_plaintext_data (struct CadetChannel 
*ch,
                           env);
       ch->mid_recv.mid = htonl (1 + ntohl (ch->mid_recv.mid));
       ch->mid_futures >>= 1;
+      if ( (GNUNET_YES == ch->out_of_order) &&
+          (GNUNET_NO == ch->reliable) )
+      {
+       /* possibly shift by more if we skipped messages */
+       uint64_t delta = htonl (msg->mid.mid) - 1 - ntohl (ch->mid_recv.mid);
+       
+       if (delta > 63)
+         ch->mid_futures = 0;
+       else
+         ch->mid_futures >>= delta;
+       ch->mid_recv.mid = htonl (1 + ntohl (msg->mid.mid));
+      }
       send_channel_data_ack (ch);
       return;
     }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]