Module: kamailio
Branch: master
Commit: b7047205287a0fde12b3568bd0cd0425eeb68fcd
URL:
https://github.com/kamailio/kamailio/commit/b7047205287a0fde12b3568bd0cd042…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-08-27T12:38:35+02:00
app_lua: rmode 1 corresponds to int returned value
---
Modified: src/modules/app_lua/app_lua_sr.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b7047205287a0fde12b3568bd0cd042…
Patch:
https://github.com/kamailio/kamailio/commit/b7047205287a0fde12b3568bd0cd042…
---
diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c
index 165f43bf06..24ae3fb63e 100644
--- a/src/modules/app_lua/app_lua_sr.c
+++ b/src/modules/app_lua/app_lua_sr.c
@@ -906,9 +906,9 @@ static int lua_sr_pv_push_val_null (lua_State *L, int rmode)
static int lua_sr_pv_push_valx (lua_State *L, int rmode, int vi, str *vs)
{
if(rmode==1) {
- lua_pushlstring(L, vs->s, vs->len);
- } else {
lua_pushinteger(L, vi);
+ } else {
+ lua_pushlstring(L, vs->s, vs->len);
}
return 1;
}