only use good acks for delay calculation
authorChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 14:47:41 +0000 (14:47 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 17 Nov 2011 14:47:41 +0000 (14:47 +0000)
src/fragmentation/fragmentation.c

index 47b8a1929a58b1c1d2a5f7406c922ab71af947b6..c7207cb12e9682ac7666680e72187c004273858e 100644 (file)
@@ -324,7 +324,8 @@ GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
   if (ntohl (fa->fragment_id) != fc->fragment_id)
     return GNUNET_SYSERR;       /* not our ACK */
   abits = GNUNET_ntohll (fa->bits);
-  if (GNUNET_YES == fc->wack)
+  if ( (GNUNET_YES == fc->wack) &&
+       (abits == (fc->acks & abits)) )
   {
     /* normal ACK, can update running average of delay... */
     fc->wack = GNUNET_NO;