提交 d698492a authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #457 in FS/freeswitch from…

Merge pull request #457 in FS/freeswitch from ~LEKENSTEYN/freeswitch:bugfix/FS-8099-lua-dialplan to master

* commit '7749a9f5':
  Restore LUA dialplan ACTIONS functionality
......@@ -591,7 +591,7 @@ SWITCH_STANDARD_DIALPLAN(lua_dialplan_hunt)
/* expecting ACTIONS = { {"app1", "app_data1"}, { "app2" }, "app3" } -- each of three is valid */
lua_getglobal(L, "ACTIONS");
if (!lua_istable(L, 1)) {
if (!lua_istable(L, -1)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR,
"Global variable ACTIONS may only be a table\n");
goto done;
......@@ -599,7 +599,7 @@ SWITCH_STANDARD_DIALPLAN(lua_dialplan_hunt)
lua_pushnil(L); /* STACK = tab | nil */
while (lua_next(L, 1) != 0) { /* STACK = tab | k1 .. kn | vn */
while (lua_next(L, -2) != 0) { /* STACK = tab | k1 .. kn | vn */
char *application = NULL, *app_data = NULL;
if (lua_isstring(L, -1)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论