aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-07 13:40:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-07 16:15:28 +0100
commit8e1c9b1e7c1144abff211c93736164f9311d929f (patch)
tree7b53aa234198be60db74696091aa099f7329b2ef /src/lua
parenta87ecbcc1c1d67698e2ae10d2455bc458321e4cb (diff)
downloadrspamd-8e1c9b1e7c1144abff211c93736164f9311d929f.tar.gz
rspamd-8e1c9b1e7c1144abff211c93736164f9311d929f.zip
[Project] Store settings id directly
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_task.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index c1b50484d..3218a958f 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -4869,14 +4869,11 @@ lua_task_get_settings_id (lua_State *L)
{
LUA_TRACE_POINT;
struct rspamd_task *task = lua_check_task (L, 1);
- guint32 *hp;
if (task != NULL) {
- hp = rspamd_mempool_get_variable (task->task_pool,
- RSPAMD_MEMPOOL_SETTINGS_HASH);
- if (hp) {
- lua_pushnumber (L, *hp);
+ if (task->settings_id) {
+ lua_pushnumber (L, task->settings_id);
}
else {
lua_pushnil (L);