]> source.dussan.org Git - rspamd.git/commitdiff
[Project] Link symcache item to metric symbol
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 14 Jun 2019 14:40:51 +0000 (15:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 14 Jun 2019 14:40:51 +0000 (15:40 +0100)
src/libserver/cfg_file.h
src/libserver/rspamd_symcache.c

index dc11d7aab84773a6a64b7f202c588305619aed29..a3cf93d63db21ffdf6d180d16b379acc2b2aad93 100644 (file)
@@ -136,6 +136,7 @@ struct rspamd_symbol {
        struct rspamd_symbols_group *gr; /* Main group */
        GPtrArray *groups; /* Other groups */
        enum rspamd_symbol_flags flags;
+       struct rspamd_symcache_item *cache_item;
        gint nshots;
 };
 
index deb1cfaddcb7dd6f4a86336512decddd6c2f33b2..fd9db9126f675d6e3752de2a695a7653c1356c11 100644 (file)
@@ -1300,6 +1300,7 @@ rspamd_symcache_metric_validate_cb (gpointer k, gpointer v, gpointer ud)
 
        if (item) {
                item->st->weight = weight;
+               s->cache_item = item;
        }
 }