diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-16 15:33:39 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-09-16 15:33:39 +0100 |
commit | d999f2bf3873910f5160429b42885073324f6479 (patch) | |
tree | d4e74363f6e589df27e4821170c1e2c42db2beca /src/lua | |
parent | d203a22d5c410bb0b04df0ce10e1293e169a5a68 (diff) | |
download | rspamd-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.c | 2 | ||||
-rw-r--r-- | src/lua/lua_task.c | 3 |
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; |