aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-24 20:14:25 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-24 20:14:25 +0000
commit1629eb5614c82e4ec3b1d480ee74d01eac0b66fe (patch)
tree624955bcb0f61765c380dd5ce3c809319794060d /src/lua
parent5456e25df0d4303f0e14b84e0a090d1fae746f49 (diff)
downloadrspamd-1629eb5614c82e4ec3b1d480ee74d01eac0b66fe.tar.gz
rspamd-1629eb5614c82e4ec3b1d480ee74d01eac0b66fe.zip
[Minor] Fix null logging object in the logger
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_logger.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c
index ccf6087de..fc0f5fe9f 100644
--- a/src/lua/lua_logger.c
+++ b/src/lua/lua_logger.c
@@ -949,9 +949,12 @@ lua_logger_logx (lua_State *L)
if (lua_type (L, 3) == LUA_TSTRING) {
uid = luaL_checkstring (L, 3);
}
- else {
+ else if (lua_type (L, 3) == LUA_TUSERDATA) {
uid = lua_logger_get_id (L, 3, NULL);
}
+ else {
+ uid = "???";
+ }
if (uid && modname) {
if (lua_type (L, 4) == LUA_TSTRING) {