aboutsummaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-09 01:08:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-10-09 01:08:58 +0100
commitaeb484cac64fbdc876f0e1a58efa1490cdf029f5 (patch)
treebeebd3bf93f17d461e813605cb4b4fb6dac92f17 /src/controller.c
parentf1979c2e4d51a0114b0716203090171d6c92b82c (diff)
downloadrspamd-aeb484cac64fbdc876f0e1a58efa1490cdf029f5.tar.gz
rspamd-aeb484cac64fbdc876f0e1a58efa1490cdf029f5.zip
Place symbol definition in metric->symbols hash.
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller.c b/src/controller.c
index 5c65d88e7..02a5d4d2e 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -1053,7 +1053,7 @@ rspamd_controller_handle_savesymbols (
struct rspamd_controller_worker_ctx *ctx;
const gchar *error;
gdouble val;
- struct symbol *sym;
+ struct rspamd_symbol_def *sym;
int added = 0;
ctx = session->ctx;
@@ -1119,7 +1119,7 @@ rspamd_controller_handle_savesymbols (
val = ucl_object_todouble (jvalue);
sym =
g_hash_table_lookup (metric->symbols, ucl_object_tostring (jname));
- if (sym && fabs (sym->score - val) > 0.01) {
+ if (sym && fabs (*sym->weight_ptr - val) > 0.01) {
if (!add_dynamic_symbol (ctx->cfg, DEFAULT_METRIC,
ucl_object_tostring (jname), val)) {
msg_err ("add symbol failed for %s",