From ac2d3dfba0a971bd0f73724f99a318fc1f371b5c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 28 Aug 2015 17:06:48 +0100 Subject: Use config checksum for unique tag. --- src/lua/lua_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lua/lua_util.c') diff --git a/src/lua/lua_util.c b/src/lua/lua_util.c index 260ec7b30..4655399b4 100644 --- a/src/lua/lua_util.c +++ b/src/lua/lua_util.c @@ -151,7 +151,7 @@ lua_util_load_rspamd_config (lua_State *L) if (cfg_name) { cfg = g_malloc0 (sizeof (struct rspamd_config)); rspamd_init_cfg (cfg, FALSE); - cfg->cache = rspamd_symbols_cache_new (); + cfg->cache = rspamd_symbols_cache_new (cfg); if (rspamd_config_read (cfg, cfg_name, NULL, NULL, NULL, NULL)) { msg_err ("cannot load config from %s", cfg_name); @@ -159,7 +159,7 @@ lua_util_load_rspamd_config (lua_State *L) } else { rspamd_config_post_load (cfg); - rspamd_symbols_cache_init (cfg->cache, cfg); + rspamd_symbols_cache_init (cfg->cache); pcfg = lua_newuserdata (L, sizeof (struct rspamd_config *)); rspamd_lua_setclass (L, "rspamd{config}", -1); *pcfg = cfg; @@ -184,7 +184,7 @@ lua_util_config_from_ucl (lua_State *L) rspamd_init_cfg (cfg, FALSE); cfg->lua_state = L; cfg->rcl_obj = obj; - cfg->cache = rspamd_symbols_cache_new (); + cfg->cache = rspamd_symbols_cache_new (cfg); top = rspamd_rcl_config_init (); if (!rspamd_rcl_parse (top, cfg, cfg->cfg_pool, cfg->rcl_obj, &err)) { @@ -194,7 +194,7 @@ lua_util_config_from_ucl (lua_State *L) } else { rspamd_config_post_load (cfg); - rspamd_symbols_cache_init (cfg->cache, cfg); + rspamd_symbols_cache_init (cfg->cache); pcfg = lua_newuserdata (L, sizeof (struct rspamd_config *)); rspamd_lua_setclass (L, "rspamd{config}", -1); *pcfg = cfg; -- cgit v1.2.3