diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-10-25 21:39:38 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-10-25 21:39:38 +0400 |
commit | 67e60b72919e9c33b25da7088a92c03d591ecf3f (patch) | |
tree | d974e3f9909e1181a6615d70f91a09f04ba92a65 /src/settings.c | |
parent | 11e2283597d33b6decfbe453c877af1a5d5488f5 (diff) | |
download | rspamd-67e60b72919e9c33b25da7088a92c03d591ecf3f.tar.gz rspamd-67e60b72919e9c33b25da7088a92c03d591ecf3f.zip |
Fix action settings (reported by Anton Nekhoroshih).
Split smtp code to 'utils', 'protocol' and 'worker' functions.
* Add support of actions for smtp worker.
Diffstat (limited to 'src/settings.c')
-rw-r--r-- | src/settings.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/settings.c b/src/settings.c index cbf73ddd4..65dea078e 100644 --- a/src/settings.c +++ b/src/settings.c @@ -228,7 +228,7 @@ json_fin_cb (memory_pool_t * pool, struct map_cb_data *data) while (act_it) { act_value = json_object_iter_value (act_it); - if (it_val && json_is_number (act_value)) { + if (act_value && json_is_number (act_value)) { if (check_action_str (json_object_iter_key (act_it), &j)) { new_act = g_malloc (sizeof (struct metric_action)); new_act->action = j; @@ -239,15 +239,15 @@ json_fin_cb (memory_pool_t * pool, struct map_cb_data *data) /* Special cases */ if (g_ascii_strcasecmp (json_object_iter_key (act_it), "spam_score") == 0) { score = g_malloc (sizeof (double)); - *score = json_number_value (act_it); + *score = json_number_value (act_value); g_hash_table_insert (cur_settings->metric_scores, - g_strdup (json_object_iter_key (act_it)), score); + g_strdup (json_object_iter_key (json_it)), score); } else if (g_ascii_strcasecmp (json_object_iter_key (act_it), "reject_score") == 0) { score = g_malloc (sizeof (double)); - *score = json_number_value (act_it); + *score = json_number_value (act_value); g_hash_table_insert (cur_settings->reject_scores, - g_strdup (json_object_iter_key (act_it)), score); + g_strdup (json_object_iter_key (json_it)), score); } } } |