diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-13 14:22:04 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-13 14:22:04 +0000 |
commit | 60107a1f7d79df078c8528618c026858092d2d46 (patch) | |
tree | 36ced99f94959ab7a3c72823a6faad750bc5dcbd /src/controller.c | |
parent | 776a0273b5dc02498fcc24373bdb76ae608219fa (diff) | |
download | rspamd-60107a1f7d79df078c8528618c026858092d2d46.tar.gz rspamd-60107a1f7d79df078c8528618c026858092d2d46.zip |
[Project] Add concept of flexible actions
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c index b8eface74..ee7e80e20 100644 --- a/src/controller.c +++ b/src/controller.c @@ -882,7 +882,7 @@ rspamd_controller_handle_actions (struct rspamd_http_connection_entry *conn_ent, ucl_object_fromstring (rspamd_action_to_str ( act->action)), "action", 0, false); ucl_object_insert_key (obj, ucl_object_fromdouble ( - act->score), "value", 0, false); + act->threshold), "value", 0, false); ucl_array_append (top, obj); } @@ -2238,8 +2238,8 @@ rspamd_controller_handle_saveactions ( score = ucl_object_todouble (cur); } - if ((isnan (session->cfg->actions[act].score) != isnan (score)) || - (session->cfg->actions[act].score != score)) { + if ((isnan (session->cfg->actions[act].threshold) != isnan (score)) || + (session->cfg->actions[act].threshold != score)) { add_dynamic_action (ctx->cfg, DEFAULT_METRIC, act, score); added ++; } |