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) { _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn