]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove multiple metrics support when adding results
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 8 Oct 2017 08:51:19 +0000 (09:51 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 8 Oct 2017 08:51:19 +0000 (09:51 +0100)
src/libmime/filter.c

index 51a2d5c47fe9290ce179c213122f17cb1fdc0a36..18ffce903c8488a6f648f1ebf0b8b5c628eeb9dd 100644 (file)
@@ -264,29 +264,15 @@ insert_result_common (struct rspamd_task *task,
        const gchar *opt,
        gboolean single)
 {
-       struct rspamd_metric *metric;
-       GList *cur, *metric_list;
        struct rspamd_symbol_result *s = NULL;
 
-       metric_list = g_hash_table_lookup (task->cfg->metrics_symbols, symbol);
-       if (metric_list) {
-               cur = metric_list;
-
-               while (cur) {
-                       metric = cur->data;
-                       s = insert_metric_result (task, metric, symbol, flag, opt, single);
-                       cur = g_list_next (cur);
-               }
-       }
-       else {
-               /* Insert symbol to default metric */
-               s = insert_metric_result (task,
+       /* Insert symbol to default metric */
+       s = insert_metric_result (task,
                        task->cfg->default_metric,
                        symbol,
                        flag,
                        opt,
                        single);
-       }
 
        /* Process cache item */
        if (task->cfg->cache) {