Module: kamailio
Branch: master
Commit: fd3656fba3fe5dcb472836f935e2b4781b02251e
URL:
https://github.com/kamailio/kamailio/commit/fd3656fba3fe5dcb472836f935e2b47…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-08-25T16:01:39+02:00
app_lua: proper return 'nil' for $null values of pvs
---
Modified: src/modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fd3656fba3fe5dcb472836f935e2b47…
Patch:
https://github.com/kamailio/kamailio/commit/fd3656fba3fe5dcb472836f935e2b47…
---
diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c
index 61c661852d..165f43bf06 100644
--- a/src/modules/app_lua/app_lua_sr.c
+++ b/src/modules/app_lua/app_lua_sr.c
@@ -892,13 +892,12 @@ static int lua_sr_pv_push_val_null (lua_State *L, int rmode)
{
if(rmode==1) {
lua_pushlstring(L, "<<null>>", 8);
- return 1;
} else if(rmode==2) {
lua_pushlstring(L, "", 0);
- return 1;
} else {
- return 0;
+ lua_pushnil(L);
}
+ return 1;
}
/**