diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-27 11:53:24 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-06-27 11:53:24 +0000 |
commit | 3b912c2e25b4779672cc29b2b10923fcfa993b3c (patch) | |
tree | a1adf57abc84137dc7679641c7ff73ecbdd8bc4e /src/ats/plugin_ats_ril.c | |
parent | 6947ab52930dff46329a1636a697ba3669969fc7 (diff) | |
download | gnunet-3b912c2e25b4779672cc29b2b10923fcfa993b3c.tar.gz gnunet-3b912c2e25b4779672cc29b2b10923fcfa993b3c.zip |
clarify cfg loading
Diffstat (limited to 'src/ats/plugin_ats_ril.c')
-rw-r--r-- | src/ats/plugin_ats_ril.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c index 35812029c..3d4ffae8d 100644 --- a/src/ats/plugin_ats_ril.c +++ b/src/ats/plugin_ats_ril.c | |||
@@ -2681,7 +2681,16 @@ libgnunet_plugin_ats_ril_init (void *cls) | |||
2681 | 2681 | ||
2682 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (env->cfg, "ats", "RIL_ALGORITHM", &string)) | 2682 | if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (env->cfg, "ats", "RIL_ALGORITHM", &string)) |
2683 | { | 2683 | { |
2684 | solver->parameters.algorithm = !strcmp (string, "SARSA") ? RIL_ALGO_SARSA : RIL_ALGO_Q; | 2684 | GNUNET_STRINGS_utf8_toupper (string, string); |
2685 | if (0 == strcmp (string, "SARSA")) | ||
2686 | { | ||
2687 | solver->parameters.algorithm = RIL_ALGO_SARSA; | ||
2688 | } | ||
2689 | if (0 == strcmp (string, "Q-LEARNING")) | ||
2690 | { | ||
2691 | solver->parameters.algorithm = RIL_ALGO_Q; | ||
2692 | } | ||
2693 | |||
2685 | GNUNET_free (string); | 2694 | GNUNET_free (string); |
2686 | } | 2695 | } |
2687 | else | 2696 | else |