Module: kamailio
Branch: master
Commit: b7047205287a0fde12b3568bd0cd0425eeb68fcd
URL: 
https://github.com/kamailio/kamailio/commit/b7047205287a0fde12b3568bd0cd0425eeb68fcd

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@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/b7047205287a0fde12b3568bd0cd0425eeb68fcd.diff
Patch: 
https://github.com/kamailio/kamailio/commit/b7047205287a0fde12b3568bd0cd0425eeb68fcd.patch

---

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;
 }


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to