[sr-dev] git:master:b7047205: app_lua: rmode 1 corresponds to int returned value

Daniel-Constantin Mierla miconda at gmail.com
Mon Aug 27 12:40:00 CEST 2018


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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;
 }




More information about the sr-dev mailing list