diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-24 15:47:51 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-24 15:47:51 +0000 |
commit | 06f9df52ebfe23b8017e9fd07750a849656328a9 (patch) | |
tree | abb80c3506c1632c6823258ce79bdb70477b516f /src/controller.c | |
parent | 71fb2acea714e1da39a53e89e1950925b9b8337c (diff) | |
download | rspamd-06f9df52ebfe23b8017e9fd07750a849656328a9.tar.gz rspamd-06f9df52ebfe23b8017e9fd07750a849656328a9.zip |
[Rework] Further fixes to symbols frequencies
Diffstat (limited to 'src/controller.c')
-rw-r--r-- | src/controller.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/controller.c b/src/controller.c index 599cea35c..b5af6adc9 100644 --- a/src/controller.c +++ b/src/controller.c @@ -776,8 +776,7 @@ rspamd_controller_handle_symbols (struct rspamd_http_connection_entry *conn_ent, group_symbols = ucl_object_typed_new (UCL_ARRAY); while (g_hash_table_iter_next (&sit, &k, &v)) { - guint freq = 0; - gdouble tm = 0.0; + gdouble tm = 0.0, freq = 0; sym = v; sym_obj = ucl_object_typed_new (UCL_OBJECT); @@ -796,7 +795,7 @@ rspamd_controller_handle_symbols (struct rspamd_http_connection_entry *conn_ent, if (rspamd_symbols_cache_stat_symbol (session->ctx->cfg->cache, sym->name, &freq, &tm)) { ucl_object_insert_key (sym_obj, - ucl_object_fromint (freq), + ucl_object_fromdouble (freq), "frequency", 0, false); ucl_object_insert_key (sym_obj, ucl_object_fromdouble (tm), |