From: Christian Grothoff Date: Thu, 4 Aug 2011 10:52:24 +0000 (+0000) Subject: fixnpe X-Git-Tag: initial-import-from-subversion-38251~17481 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2bafe47e22ab6ff00c66ef293621c80a92c616a4;p=oweals%2Fgnunet.git fixnpe --- diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 4db3505dd..d3ea241a5 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -997,8 +997,9 @@ put_migration_continuation (void *cls, } GNUNET_free (pmc); /* FIXME: should we really update the load value on failure? */ - GNUNET_LOAD_update (datastore_put_load, - delay.rel_value); + if (NULL != datastore_put_load) + GNUNET_LOAD_update (datastore_put_load, + delay.rel_value); if (GNUNET_OK == success) return; GNUNET_STATISTICS_update (GSF_stats, @@ -1021,6 +1022,8 @@ test_put_load_too_high (uint32_t priority) { double ld; + if (NULL == datastore_put_load) + return GNUNET_NO; if (GNUNET_LOAD_get_average (datastore_put_load) < 50) return GNUNET_NO; /* very fast */ ld = GNUNET_LOAD_get_load (datastore_put_load);