aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/filter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-15 14:21:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-05-15 14:21:41 +0100
commitf57c6e2c50e05aebbc9020fc9fe58b647b15b9dd (patch)
tree53f4d90ce06efaabf776586bdd8e038744b33a5f /src/libmime/filter.c
parent1d2cb297a1cd882e6b0ea75ca5c081f844742c18 (diff)
downloadrspamd-f57c6e2c50e05aebbc9020fc9fe58b647b15b9dd.tar.gz
rspamd-f57c6e2c50e05aebbc9020fc9fe58b647b15b9dd.zip
[Feature] Allow multiple groups for symbols
Diffstat (limited to 'src/libmime/filter.c')
-rw-r--r--src/libmime/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c
index f7d4e3410..c9367514f 100644
--- a/src/libmime/filter.c
+++ b/src/libmime/filter.c
@@ -92,6 +92,7 @@ insert_metric_result (struct rspamd_task *task,
struct rspamd_symbols_group *gr = NULL;
const ucl_object_t *mobj, *sobj;
gint max_shots;
+ guint i;
gboolean single = !!(flags & RSPAMD_SYMBOL_INSERT_SINGLE);
metric_res = rspamd_create_metric_result (task);
@@ -113,9 +114,8 @@ insert_metric_result (struct rspamd_task *task,
}
else {
final_score = (*sdef->weight_ptr) * weight;
- gr = sdef->gr;
- if (gr != NULL) {
+ PTR_ARRAY_FOREACH (sdef->groups, i, gr) {
gr_score = g_hash_table_lookup (metric_res->sym_groups, gr);
if (gr_score == NULL) {