diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-06-15 14:14:22 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-06-15 14:14:22 +0100 |
commit | 8c115d958c16dcc51cc8c6668e0f9df18e6eed02 (patch) | |
tree | 4aaf72db1a5220f38bb646a214c3c5562afb098e /src/rspamd_proxy.c | |
parent | 193d9de3f0e9a9517f1ee019afd46bbf6cb63f57 (diff) | |
download | rspamd-8c115d958c16dcc51cc8c6668e0f9df18e6eed02.tar.gz rspamd-8c115d958c16dcc51cc8c6668e0f9df18e6eed02.zip |
[Minor] Add log tag to proxy scripts
Issue: #4126
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r-- | src/rspamd_proxy.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 2354576f7..33906e31c 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -1011,13 +1011,17 @@ proxy_call_cmp_script (struct rspamd_proxy_session *session, gint cbref) } } - if (lua_pcall (L, 1, 0, err_idx) != 0) { + gchar log_tag[RSPAMD_LOG_ID_LEN + 1]; + rspamd_strlcpy(log_tag, session->pool->tag.uid, sizeof (session->pool->tag.uid)); + lua_pushstring(L, log_tag); + + if (lua_pcall (L, 2, 0, err_idx) != 0) { msg_err_session ( "cannot run lua compare script: %s", lua_tostring (L, -1)); } - lua_settop (L, 0); + lua_settop (L, err_idx - 1); } static void |