diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-04 10:52:24 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-04 10:52:24 +0000 |
commit | 2bafe47e22ab6ff00c66ef293621c80a92c616a4 (patch) | |
tree | dd13799fdbebc9ec9cb73b62203f2338b3f1e083 | |
parent | 2a5cfed3f37738f35d727948b637161f97fe6a8e (diff) | |
download | gnunet-2bafe47e22ab6ff00c66ef293621c80a92c616a4.tar.gz gnunet-2bafe47e22ab6ff00c66ef293621c80a92c616a4.zip |
fixnpe
-rw-r--r-- | src/fs/gnunet-service-fs_pr.c | 7 |
1 files changed, 5 insertions, 2 deletions
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, | |||
997 | } | 997 | } |
998 | GNUNET_free (pmc); | 998 | GNUNET_free (pmc); |
999 | /* FIXME: should we really update the load value on failure? */ | 999 | /* FIXME: should we really update the load value on failure? */ |
1000 | GNUNET_LOAD_update (datastore_put_load, | 1000 | if (NULL != datastore_put_load) |
1001 | delay.rel_value); | 1001 | GNUNET_LOAD_update (datastore_put_load, |
1002 | delay.rel_value); | ||
1002 | if (GNUNET_OK == success) | 1003 | if (GNUNET_OK == success) |
1003 | return; | 1004 | return; |
1004 | GNUNET_STATISTICS_update (GSF_stats, | 1005 | GNUNET_STATISTICS_update (GSF_stats, |
@@ -1021,6 +1022,8 @@ test_put_load_too_high (uint32_t priority) | |||
1021 | { | 1022 | { |
1022 | double ld; | 1023 | double ld; |
1023 | 1024 | ||
1025 | if (NULL == datastore_put_load) | ||
1026 | return GNUNET_NO; | ||
1024 | if (GNUNET_LOAD_get_average (datastore_put_load) < 50) | 1027 | if (GNUNET_LOAD_get_average (datastore_put_load) < 50) |
1025 | return GNUNET_NO; /* very fast */ | 1028 | return GNUNET_NO; /* very fast */ |
1026 | ld = GNUNET_LOAD_get_load (datastore_put_load); | 1029 | ld = GNUNET_LOAD_get_load (datastore_put_load); |