gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r6201 - GNUnet/src/applications/fs/gap


From: gnunet
Subject: [GNUnet-SVN] r6201 - GNUnet/src/applications/fs/gap
Date: Fri, 8 Feb 2008 01:54:53 -0700 (MST)

Author: grothoff
Date: 2008-02-08 01:54:53 -0700 (Fri, 08 Feb 2008)
New Revision: 6201

Modified:
   GNUnet/src/applications/fs/gap/plan.c
Log:
fix

Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c       2008-02-08 07:29:15 UTC (rev 
6200)
+++ GNUnet/src/applications/fs/gap/plan.c       2008-02-08 08:54:53 UTC (rev 
6201)
@@ -384,7 +384,8 @@
 
   /* generate score, ttl and priority */
   prio = rpc->request->last_prio_used + 
GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, 2); /* increase over time */
-  if (prio < history->last_good_prio)
+  if ( (history != NULL) &&
+       (prio < history->last_good_prio) )
     prio = history->last_good_prio - 
GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, 2); /* fall over time */
   if (prio > 1)
     {





reply via email to

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