mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Remove the problematic and unneeded AST_MODFLAG_GLOBAL_SYMBOLS from pbx_lua.c
AST_MODFLAG_GLOBAL_SYMBOLS was causing the module to be incorrectly loaded before pbx_config. pbx_config was therefore blowing away contexts that were created by pbx_lua. With AST_MODFLAG_DEFAULT the load order is now correct and contexs are being properly merged. AST_MODFLAG_GLOBAL_SYMBOLS was not needed anyway since no other modules needed its global symbols that early. ASTERISK-23818 #close Reported by: Dennis Guse Tested by: Dennis Guse Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3629/ ........ Merged revisions 416668 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 416669 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1636,6 +1636,9 @@ static int load_or_reload_lua_stuff(void)
|
|||||||
res = AST_MODULE_LOAD_DECLINE;
|
res = AST_MODULE_LOAD_DECLINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!res) {
|
||||||
|
ast_log(LOG_NOTICE, "Lua PBX Switch loaded.\n");
|
||||||
|
}
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -1645,6 +1648,7 @@ static int unload_module(void)
|
|||||||
ast_context_destroy(NULL, registrar);
|
ast_context_destroy(NULL, registrar);
|
||||||
ast_unregister_switch(&lua_switch);
|
ast_unregister_switch(&lua_switch);
|
||||||
lua_free_extensions();
|
lua_free_extensions();
|
||||||
|
ast_log(LOG_NOTICE, "Lua PBX Switch unloaded.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1668,7 +1672,7 @@ static int load_module(void)
|
|||||||
return AST_MODULE_LOAD_SUCCESS;
|
return AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Lua PBX Switch",
|
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Lua PBX Switch",
|
||||||
.load = load_module,
|
.load = load_module,
|
||||||
.unload = unload_module,
|
.unload = unload_module,
|
||||||
.reload = reload,
|
.reload = reload,
|
||||||
|
Reference in New Issue
Block a user