aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_task.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-24 19:04:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-24 19:04:26 +0000
commit19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8 (patch)
treee313a5356d64b095960bca6ccd569a99180ae5b2 /src/lua/lua_task.c
parent22db618165cfb1ee0f3ff808fd27603c55cf9234 (diff)
downloadrspamd-19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8.tar.gz
rspamd-19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8.zip
[Minor] Fix a name and the description of bogus `user` field in the task
Diffstat (limited to 'src/lua/lua_task.c')
-rw-r--r--src/lua/lua_task.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 3fb61f9d4..b0ddc5e42 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -4144,8 +4144,8 @@ lua_task_get_user (lua_State *L)
struct rspamd_task *task = lua_check_task (L, 1);
if (task) {
- if (task->user != NULL) {
- lua_pushstring (L, task->user);
+ if (task->auth_user != NULL) {
+ lua_pushstring (L, task->auth_user);
}
else {
lua_pushnil (L);
@@ -4170,27 +4170,27 @@ lua_task_set_user (lua_State *L)
if (lua_type (L, 2) == LUA_TSTRING) {
new_user = lua_tostring (L, 2);
- if (task->user) {
+ if (task->auth_user) {
/* Push old user */
- lua_pushstring (L, task->user);
+ lua_pushstring (L, task->auth_user);
}
else {
lua_pushnil (L);
}
- task->user = rspamd_mempool_strdup (task->task_pool, new_user);
+ task->auth_user = rspamd_mempool_strdup (task->task_pool, new_user);
}
else {
/* Reset user */
- if (task->user) {
+ if (task->auth_user) {
/* Push old user */
- lua_pushstring (L, task->user);
+ lua_pushstring (L, task->auth_user);
}
else {
lua_pushnil (L);
}
- task->user = NULL;
+ task->auth_user = NULL;
}
}
else {