diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-22 14:08:26 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-22 14:08:26 +0000 |
commit | 7849cfa0767a48fd6cfbf0b41f5a42c4352a0e87 (patch) | |
tree | 6c4911652b9bea8e5fe4f49afd522e78b93b1617 /src/libserver/task.c | |
parent | 532914ab6ccbff8ab1105e7883d2ea008858bd5a (diff) | |
download | rspamd-7849cfa0767a48fd6cfbf0b41f5a42c4352a0e87.tar.gz rspamd-7849cfa0767a48fd6cfbf0b41f5a42c4352a0e87.zip |
[Fix] Preserve order of options in symbols
Diffstat (limited to 'src/libserver/task.c')
-rw-r--r-- | src/libserver/task.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libserver/task.c b/src/libserver/task.c index 4d20edb83..cbd9a7a31 100644 --- a/src/libserver/task.c +++ b/src/libserver/task.c @@ -1031,19 +1031,15 @@ rspamd_task_log_metric_res (struct rspamd_task *task, } if (lf->flags & RSPAMD_LOG_FLAG_SYMBOLS_PARAMS) { - GHashTableIter it; - gpointer k, v; - rspamd_printf_fstring (&symbuf, "{"); if (sym->options) { - j = 0; - g_hash_table_iter_init (&it, sym->options); + struct rspamd_symbol_option *opt; - while (g_hash_table_iter_next (&it, &k, &v)) { - const char *opt = v; + j = 0; - rspamd_printf_fstring (&symbuf, "%s;", opt); + DL_FOREACH (sym->opts_head, opt) { + rspamd_printf_fstring (&symbuf, "%s;", opt->option); if (j >= max_log_elts) { rspamd_printf_fstring (&symbuf, "...;"); |