commit 1629eb5: [Minor] Fix null logging object in the logger
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Feb 24 20:49:09 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-02-24 20:14:25 +0000
URL: https://github.com/rspamd/rspamd/commit/1629eb5614c82e4ec3b1d480ee74d01eac0b66fe
[Minor] Fix null logging object in the logger
---
src/lua/lua_logger.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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) {
More information about the Commits
mailing list