[sr-dev] git:master:0870a36d: app_lua: fixed index of param array for some mongo api functions

Daniel-Constantin Mierla miconda at gmail.com
Thu May 7 00:10:59 CEST 2015


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-05-07T00:09:58+02:00

app_lua: fixed index of param array for some mongo api functions

- reported by Juha Heinanen

---

Modified: modules/app_lua/app_lua_exp.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0870a36d4c94f70d88f4c6e80aafd12ec402fb22.diff
Patch: https://github.com/kamailio/kamailio/commit/0870a36d4c94f70d88f4c6e80aafd12ec402fb22.patch

---

diff --git a/modules/app_lua/app_lua_exp.c b/modules/app_lua/app_lua_exp.c
index e168ae9..6853b2d 100644
--- a/modules/app_lua/app_lua_exp.c
+++ b/modules/app_lua/app_lua_exp.c
@@ -2752,7 +2752,7 @@ static int lua_sr_ndb_mongodb_next_reply(lua_State *L)
 	}
 
 	param[0].s = (char *) lua_tostring(L, -1);
-	param[0].len = strlen(param[4].s);
+	param[0].len = strlen(param[0].s);
 
 	ret = _lua_ndb_mongodbb.next_reply(&param[0]);
 
@@ -2779,7 +2779,7 @@ static int lua_sr_ndb_mongodb_free_reply(lua_State *L)
 	}
 
 	param[0].s = (char *) lua_tostring(L, -1);
-	param[0].len = strlen(param[4].s);
+	param[0].len = strlen(param[0].s);
 
 	ret = _lua_ndb_mongodbb.free_reply(&param[0]);
 




More information about the sr-dev mailing list