Module: kamailio
Branch: master
Commit: 74bcf6e3f891def532fbcba7d709b3ee7ce9614d
URL:
https://github.com/kamailio/kamailio/commit/74bcf6e3f891def532fbcba7d709b3e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-01-24T13:55:55+01:00
app_lua_sr: fixed confition on number of parameters for xavp get
---
Modified: src/modules/app_lua_sr/app_lua_sr_api.c
---
Diff:
https://github.com/kamailio/kamailio/commit/74bcf6e3f891def532fbcba7d709b3e…
Patch:
https://github.com/kamailio/kamailio/commit/74bcf6e3f891def532fbcba7d709b3e…
---
diff --git a/src/modules/app_lua_sr/app_lua_sr_api.c
b/src/modules/app_lua_sr/app_lua_sr_api.c
index 58b9d8c60a..90267467d6 100644
--- a/src/modules/app_lua_sr/app_lua_sr_api.c
+++ b/src/modules/app_lua_sr/app_lua_sr_api.c
@@ -1466,7 +1466,7 @@ static int lua_sr_xavp_get(lua_State *L)
env_L = _app_lua_api.env_get_f();
num_param = lua_gettop(L);
- if(num_param<2 && num_param>3)
+ if(num_param<2 || num_param>3)
{
LM_ERR("wrong number of parameters [%d]\n", num_param);
return 0;
@@ -1615,4 +1615,4 @@ void lua_sr_core_openlibs(lua_State *L)
luaL_openlib(L, "sr.hdr", _sr_hdr_Map, 0);
luaL_openlib(L, "sr.pv", _sr_pv_Map, 0);
luaL_openlib(L, "sr.xavp", _sr_xavp_Map, 0);
-}
\ No newline at end of file
+}