aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-16 15:33:39 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-16 15:33:39 +0100
commitd999f2bf3873910f5160429b42885073324f6479 (patch)
treed4e74363f6e589df27e4821170c1e2c42db2beca /src/lua
parentd203a22d5c410bb0b04df0ce10e1293e169a5a68 (diff)
downloadrspamd-d999f2bf3873910f5160429b42885073324f6479.tar.gz
rspamd-d999f2bf3873910f5160429b42885073324f6479.zip
[Fix] Skip nostat tokens when get number of tokens
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_config.c2
-rw-r--r--src/lua/lua_task.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index 6dfd45e12..d35cd84a6 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -2548,7 +2548,7 @@ lua_config_get_symbols_count (lua_State *L)
guint res = 0;
if (cfg != NULL) {
- res = rspamd_symbols_cache_symbols_count (cfg->cache);
+ res = rspamd_symbols_cache_stats_symbols_count (cfg->cache);
}
else {
return luaL_error (L, "invalid arguments");
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 614c059dd..e3dcfc602 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -3183,7 +3183,8 @@ lua_task_get_symbols_tokens (lua_State *L)
cbd.normalize = TRUE;
}
- lua_createtable (L, rspamd_symbols_cache_symbols_count (task->cfg->cache), 0);
+ lua_createtable (L,
+ rspamd_symbols_cache_stats_symbols_count (task->cfg->cache), 0);
rspamd_symbols_cache_foreach (task->cfg->cache, tokens_foreach_cb, &cbd);
return 1;