[sr-dev] git:master:a15210d0: app_lua: get lua execution stack for previous level

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 28 19:37:45 CET 2019


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-03-28T19:33:22+01:00

app_lua: get lua execution stack for previous level

- returns the info where current function was executed

---

Modified: src/modules/app_lua/app_lua_sr.c

---

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

---

diff --git a/src/modules/app_lua/app_lua_sr.c b/src/modules/app_lua/app_lua_sr.c
index 041cb32182..72cbc7180b 100644
--- a/src/modules/app_lua/app_lua_sr.c
+++ b/src/modules/app_lua/app_lua_sr.c
@@ -1952,7 +1952,7 @@ int sr_kemi_lua_exec_func(lua_State* L, int eidx)
 				   + (tve.tv_usec - tvb.tv_usec);
 		if(tdiff >= cfg_get(core, core_cfg, latency_limit_action)) {
 			memset(&dinfo, 0, sizeof(lua_Debug));
-			if(lua_getstack(L, 0, &dinfo)>0
+			if(lua_getstack(L, 1, &dinfo)>0
 						&& lua_getinfo(L, "nSl", &dinfo)>0) {
 				LOG(cfg_get(core, core_cfg, latency_log),
 						"alert - action KSR.%s%s%s(...)"




More information about the sr-dev mailing list