gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6902 - GNUnet/src/applications/fs/fsui


From: gnunet
Subject: [GNUnet-SVN] r6902 - GNUnet/src/applications/fs/fsui
Date: Mon, 26 May 2008 20:19:33 -0600 (MDT)

Author: grothoff
Date: 2008-05-26 20:19:33 -0600 (Mon, 26 May 2008)
New Revision: 6902

Modified:
   GNUnet/src/applications/fs/fsui/deserialize.c
Log:
extra checks

Modified: GNUnet/src/applications/fs/fsui/deserialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/deserialize.c       2008-05-27 01:58:50 UTC 
(rev 6901)
+++ GNUnet/src/applications/fs/fsui/deserialize.c       2008-05-27 02:19:33 UTC 
(rev 6902)
@@ -529,6 +529,15 @@
       ret->mandatoryMatchesRemaining = remaining;
       ret->probeSuccess = probeSucc;
       ret->probeFailure = probeFail;
+      if ( (ret->probeSuccess + ret->probeFailure > GNUNET_FSUI_MAX_PROBES) ||
+          (ret->probeSuccess > GNUNET_FSUI_MAX_PROBES) ||
+          (ret->probeFailure > GNUNET_FSUI_MAX_PROBES) )
+       {
+         GNUNET_GE_BREAK(NULL, 0);
+         /* try to recover */
+         ret->probeSuccess = 0;
+         ret->probeFailure = 0;
+       }
       ret->test_download = NULL;
       ret->next = NULL;
       ret->matchingSearches = NULL;





reply via email to

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