瀏覽代碼

app_lua: get lua execution stack for previous level

- returns the info where current function was executed

(cherry picked from commit a15210d064e08ac8b1a271502360b7066bff43b6)
Daniel-Constantin Mierla 6 年之前
父節點
當前提交
a7f6227efe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/modules/app_lua/app_lua_sr.c

+ 1 - 1
src/modules/app_lua/app_lua_sr.c

@@ -1942,7 +1942,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(...)"