diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-03-10 17:34:42 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-03-10 17:34:42 +0000 |
commit | e87e273ce5f864e20fcca02c34bef72de4fc00bd (patch) | |
tree | 14125cc08e325f9133d4a7a8b43b7de5f7fece94 /src/fs/gnunet-service-fs_cp.c | |
parent | e253ed6e7e5ac2a113b6dbc762258f358c9ca5ae (diff) | |
download | gnunet-e87e273ce5f864e20fcca02c34bef72de4fc00bd.tar.gz gnunet-e87e273ce5f864e20fcca02c34bef72de4fc00bd.zip |
load
Diffstat (limited to 'src/fs/gnunet-service-fs_cp.c')
-rw-r--r-- | src/fs/gnunet-service-fs_cp.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c index 407c9f7fe..6e39d7bd2 100644 --- a/src/fs/gnunet-service-fs_cp.c +++ b/src/fs/gnunet-service-fs_cp.c | |||
@@ -618,33 +618,6 @@ handle_p2p_reply (void *cls, | |||
618 | 618 | ||
619 | 619 | ||
620 | /** | 620 | /** |
621 | * Test if the DATABASE (GET) load on this peer is too high | ||
622 | * to even consider processing the query at | ||
623 | * all. | ||
624 | * | ||
625 | * @return GNUNET_YES if the load is too high to do anything (load high) | ||
626 | * GNUNET_NO to process normally (load normal) | ||
627 | * GNUNET_SYSERR to process for free (load low) | ||
628 | */ | ||
629 | static int | ||
630 | test_get_load_too_high (uint32_t priority) | ||
631 | { | ||
632 | #if FIXME_later | ||
633 | double ld; | ||
634 | |||
635 | ld = GNUNET_LOAD_get_load (datastore_get_load); | ||
636 | if (ld < 1) | ||
637 | return GNUNET_SYSERR; | ||
638 | if (ld <= priority) | ||
639 | return GNUNET_NO; | ||
640 | return GNUNET_YES; | ||
641 | #else | ||
642 | return GNUNET_SYSERR; | ||
643 | #endif | ||
644 | } | ||
645 | |||
646 | |||
647 | /** | ||
648 | * Increase the host credit by a value. | 621 | * Increase the host credit by a value. |
649 | * | 622 | * |
650 | * @param cp which peer to change the trust value on | 623 | * @param cp which peer to change the trust value on |
@@ -699,7 +672,7 @@ bound_priority (uint32_t prio_in, | |||
699 | double rret; | 672 | double rret; |
700 | int ld; | 673 | int ld; |
701 | 674 | ||
702 | ld = test_get_load_too_high (0); | 675 | ld = GSF_test_get_load_too_high_ (0); |
703 | if (ld == GNUNET_SYSERR) | 676 | if (ld == GNUNET_SYSERR) |
704 | { | 677 | { |
705 | GNUNET_STATISTICS_update (GSF_stats, | 678 | GNUNET_STATISTICS_update (GSF_stats, |
@@ -723,7 +696,7 @@ bound_priority (uint32_t prio_in, | |||
723 | if ( (ld == GNUNET_YES) && (ret > 0) ) | 696 | if ( (ld == GNUNET_YES) && (ret > 0) ) |
724 | { | 697 | { |
725 | /* try with charging */ | 698 | /* try with charging */ |
726 | ld = test_get_load_too_high (ret); | 699 | ld = GSF_test_get_load_too_high_ (ret); |
727 | } | 700 | } |
728 | if (ld == GNUNET_YES) | 701 | if (ld == GNUNET_YES) |
729 | { | 702 | { |