aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_h323.c
diff options
context:
space:
mode:
authorpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 06:51:51 +0000
committerpcadach <pcadach@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-23 06:51:51 +0000
commit21dcb715db4b1482f66d32ac80bb061ae08663c6 (patch)
tree5e89dfbcead69898a14fd6a23d99bcca68961e19 /channels/chan_h323.c
parent1c3e3ab98bb15ad7d4653638cc94b5cabb39de99 (diff)
Do not abort Asterisk startup if h323 configuration file not found (reported by mithraen)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51615 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_h323.c')
-rw-r--r--channels/chan_h323.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index cf4e89f64..f4c1c82be 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -3091,13 +3091,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)) {
@@ -3227,8 +3231,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);