diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-07 12:46:37 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-07 12:46:37 +0000 |
commit | 6e54571bd00f7ea045dabcd5fc9fc3080665f5fc (patch) | |
tree | e8e204155e5fd9fc8bf6e7620331a9fc484ce78a /src/ats/gnunet-ats-solver-eval.c | |
parent | 577ad3b798f0cd62c2e9ab92fdc58cfe75a3fcdc (diff) | |
download | gnunet-6e54571bd00f7ea045dabcd5fc9fc3080665f5fc.tar.gz gnunet-6e54571bd00f7ea045dabcd5fc9fc3080665f5fc.zip |
simplify logic
Diffstat (limited to 'src/ats/gnunet-ats-solver-eval.c')
-rw-r--r-- | src/ats/gnunet-ats-solver-eval.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index c39bb30f7..99771d0e8 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet-ats-solver-eval.h" | 28 | #include "gnunet-ats-solver-eval.h" |
29 | #include "gnunet-service-ats_normalization.h" | 29 | #include "gnunet-service-ats_normalization.h" |
30 | #include "gnunet-service-ats_preferences.h" | 30 | #include "gnunet-service-ats_preferences.c" |
31 | 31 | ||
32 | #define BIG_M_STRING "unlimited" | 32 | #define BIG_M_STRING "unlimited" |
33 | 33 | ||
@@ -980,7 +980,6 @@ set_pref_task (void *cls, | |||
980 | pg->peer, NULL + (pg->client_id), | 980 | pg->peer, NULL + (pg->client_id), |
981 | GNUNET_ATS_print_preference_type (pg->kind), pref_value); | 981 | GNUNET_ATS_print_preference_type (pg->kind), pref_value); |
982 | 982 | ||
983 | sh->sf->s_bulk_start (sh->sf->cls); | ||
984 | if (GNUNET_YES == opt_disable_normalization) | 983 | if (GNUNET_YES == opt_disable_normalization) |
985 | { | 984 | { |
986 | p->pref_abs[pg->kind] = pref_value; | 985 | p->pref_abs[pg->kind] = pref_value; |
@@ -988,15 +987,17 @@ set_pref_task (void *cls, | |||
988 | sh->sf->s_pref (sh->sf->cls, &p->peer_id, pg->kind, pref_value); | 987 | sh->sf->s_pref (sh->sf->cls, &p->peer_id, pg->kind, pref_value); |
989 | } | 988 | } |
990 | else | 989 | else |
991 | GAS_normalization_normalize_preference (NULL + (pg->client_id), | 990 | normalize_preference (NULL + (pg->client_id), |
992 | &p->peer_id, pg->kind, pref_value); | 991 | &p->peer_id, |
993 | sh->sf->s_bulk_stop (sh->sf->cls); | 992 | pg->kind, |
993 | pref_value); | ||
994 | 994 | ||
995 | pg->set_task = GNUNET_SCHEDULER_add_delayed (pg->frequency, | 995 | pg->set_task = GNUNET_SCHEDULER_add_delayed (pg->frequency, |
996 | set_pref_task, pg); | 996 | &set_pref_task, |
997 | 997 | pg); | |
998 | } | 998 | } |
999 | 999 | ||
1000 | |||
1000 | static struct PreferenceGenerator * | 1001 | static struct PreferenceGenerator * |
1001 | find_pref_gen (unsigned int peer, enum GNUNET_ATS_PreferenceKind kind) | 1002 | find_pref_gen (unsigned int peer, enum GNUNET_ATS_PreferenceKind kind) |
1002 | { | 1003 | { |