Merged revisions 51615 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51615 | pcadach | 2007-01-22 22:51:51 -0800 (Пнд, 22 Янв 2007) | 1 line

Do not abort Asterisk startup if h323 configuration file not found (reported by mithraen)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Paul Cadach
2007-01-23 06:56:26 +00:00
parent 1fda861ff8
commit cd61f69a83
2 changed files with 11 additions and 5 deletions

View File

@@ -3201,13 +3201,17 @@ static enum ast_module_load_result load_module(void)
ASTOBJ_CONTAINER_INIT(&aliasl);
res = reload_config(0);
if (res) {
/* No config entry */
ast_log(LOG_NOTICE, "Unload and load chan_h323.so again in order to receive configuration changes.\n");
ast_cli_unregister(&cli_h323_reload);
io_context_destroy(io);
io = NULL;
sched_context_destroy(sched);
sched = NULL;
ASTOBJ_CONTAINER_DESTROY(&userl);
ASTOBJ_CONTAINER_DESTROY(&peerl);
ASTOBJ_CONTAINER_DESTROY(&aliasl);
return /*AST_MODULE_LOAD_DECLINE*/AST_MODULE_LOAD_FAILURE;
return AST_MODULE_LOAD_DECLINE;
} else {
/* Make sure we can register our channel type */
if (ast_channel_register(&oh323_tech)) {
@@ -3338,8 +3342,10 @@ static int unload_module(void)
if (!gatekeeper_disable)
h323_gk_urq();
h323_end_process();
io_context_destroy(io);
sched_context_destroy(sched);
if (io)
io_context_destroy(io);
if (sched)
sched_context_destroy(sched);
ASTOBJ_CONTAINER_DESTROYALL(&userl, oh323_destroy_user);
ASTOBJ_CONTAINER_DESTROY(&userl);