gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35355 - gnunet/src/fragmentation


From: gnunet
Subject: [GNUnet-SVN] r35355 - gnunet/src/fragmentation
Date: Sat, 7 Mar 2015 20:59:02 +0100

Author: grothoff
Date: 2015-03-07 20:59:02 +0100 (Sat, 07 Mar 2015)
New Revision: 35355

Modified:
   gnunet/src/fragmentation/defragmentation.c
Log:
further delay ACKs if we get duplicates

Modified: gnunet/src/fragmentation/defragmentation.c
===================================================================
--- gnunet/src/fragmentation/defragmentation.c  2015-03-07 19:54:28 UTC (rev 
35354)
+++ gnunet/src/fragmentation/defragmentation.c  2015-03-07 19:59:02 UTC (rev 
35355)
@@ -542,7 +542,7 @@
       bc++;
 
   /* notify about complete message */
-  if ( (duplicate == GNUNET_NO) &&
+  if ( (GNUNET_NO == duplicate) &&
        (0 == mc->bits) )
   {
     GNUNET_STATISTICS_update (dc->stats,
@@ -567,12 +567,15 @@
        linear sequence; ACK now! */
     delay = GNUNET_TIME_UNIT_ZERO;
   }
+  if (GNUNET_YES == duplicate)
+    delay = GNUNET_TIME_relative_multiply (delay,
+                                           2);
   if (NULL != mc->ack_task)
     GNUNET_SCHEDULER_cancel (mc->ack_task);
   mc->ack_task = GNUNET_SCHEDULER_add_delayed (delay,
                                                &send_ack,
                                                mc);
-  if (duplicate == GNUNET_YES)
+  if (GNUNET_YES == duplicate)
     return GNUNET_NO;
   return GNUNET_YES;
 }




reply via email to

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