aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_logger.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-06 19:01:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-06 19:01:46 +0100
commit0da96b74d5351f63630d7c7160ad9c90c446c055 (patch)
tree63138025db31c0874de8fd75ced1db3778bb9136 /src/lua/lua_logger.c
parent9c9597ebf49e41ff34171b86ffaef67102908d1c (diff)
downloadrspamd-0da96b74d5351f63630d7c7160ad9c90c446c055.tar.gz
rspamd-0da96b74d5351f63630d7c7160ad9c90c446c055.zip
Slightly improve local functions output.
Diffstat (limited to 'src/lua/lua_logger.c')
-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 b84d1623f..f5ddb2ca7 100644
--- a/src/lua/lua_logger.c
+++ b/src/lua/lua_logger.c
@@ -272,7 +272,7 @@ lua_logger_out_userdata (lua_State *L, gint pos, gchar *outbuf, gsize len)
{
gint r;
- if (!lua_getmetatable (L, pos) || len == 0) {
+ if (!lua_getmetatable (L, pos)) {
return 0;
}
@@ -399,6 +399,9 @@ lua_logger_out_type (lua_State *L, gint pos, gchar *outbuf, gsize len)
case LUA_TUSERDATA:
r = lua_logger_out_userdata (L, pos, outbuf, len);
break;
+ case LUA_TFUNCTION:
+ r = rspamd_snprintf (outbuf, len + 1, "function");
+ break;
default:
/* Try to push everything as string using tostring magic */
r = lua_logger_out_str (L, pos, outbuf, len);