diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-09 01:08:58 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-09 01:08:58 +0100 |
commit | aeb484cac64fbdc876f0e1a58efa1490cdf029f5 (patch) | |
tree | beebd3bf93f17d461e813605cb4b4fb6dac92f17 /src/libserver/dynamic_cfg.c | |
parent | f1979c2e4d51a0114b0716203090171d6c92b82c (diff) | |
download | rspamd-aeb484cac64fbdc876f0e1a58efa1490cdf029f5.tar.gz rspamd-aeb484cac64fbdc876f0e1a58efa1490cdf029f5.zip |
Place symbol definition in metric->symbols hash.
Diffstat (limited to 'src/libserver/dynamic_cfg.c')
-rw-r--r-- | src/libserver/dynamic_cfg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libserver/dynamic_cfg.c b/src/libserver/dynamic_cfg.c index 97bb2c91e..01bfb83b5 100644 --- a/src/libserver/dynamic_cfg.c +++ b/src/libserver/dynamic_cfg.c @@ -48,7 +48,7 @@ apply_dynamic_conf (const ucl_object_t *top, struct rspamd_config *cfg) ucl_object_iter_t it = NULL; struct metric *real_metric; struct metric_action *cur_action; - gdouble *w; + struct rspamd_symbol_def *s; while ((cur_elt = ucl_iterate_object (top, &it, true))) { if (ucl_object_type (cur_elt) != UCL_OBJECT) { @@ -82,9 +82,9 @@ apply_dynamic_conf (const ucl_object_t *top, struct rspamd_config *cfg) const ucl_object_t *v = ucl_object_find_key (it_val, "value"); - if((w = g_hash_table_lookup (real_metric->symbols, + if((s = g_hash_table_lookup (real_metric->symbols, ucl_object_tostring (n))) != NULL) { - *w = ucl_object_todouble (v); + *s->weight_ptr = ucl_object_todouble (v); } } else { |