aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-14 15:40:51 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-14 15:40:51 +0100
commitfee78f0f26562651ab8c8b449b0646914b23f328 (patch)
treeb18e7285ba7b39915fd11864251c29bbf065dc51
parenteb6f4e38d80f53bdc9f0d4baa8210218b975aeaf (diff)
downloadrspamd-fee78f0f26562651ab8c8b449b0646914b23f328.tar.gz
rspamd-fee78f0f26562651ab8c8b449b0646914b23f328.zip
[Project] Link symcache item to metric symbol
-rw-r--r--src/libserver/cfg_file.h1
-rw-r--r--src/libserver/rspamd_symcache.c1
2 files changed, 2 insertions, 0 deletions
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;
}
}