From fee78f0f26562651ab8c8b449b0646914b23f328 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 14 Jun 2019 15:40:51 +0100 Subject: [PATCH] [Project] Link symcache item to metric symbol --- src/libserver/cfg_file.h | 1 + src/libserver/rspamd_symcache.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index dc11d7aab..a3cf93d63 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -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; }; diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index deb1cfadd..fd9db9126 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -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; } } -- 2.39.5