aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-30 16:06:06 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-30 16:06:06 +0000
commitff99765d6fb7a3907b85e94daa10c8c754bda85d (patch)
tree3bfcbbc5a10e97bdb203c6d64496c41adaa3d305
parent7675e8d0c4e29a0cc15b3597d15e0a5442b7a8fc (diff)
Don't make Asterisk not start if pbx_dundi fails to initialize.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@255322 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--pbx/pbx_dundi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 4b7e25636..d56b543bc 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -4634,7 +4634,7 @@ static int load_module(void)
if (!io || !sched) {
ast_log(LOG_ERROR, "Out of memory\n");
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
if(set_config("dundi.conf",&sin))
@@ -4644,11 +4644,11 @@ static int load_module(void)
if (netsocket < 0) {
ast_log(LOG_ERROR, "Unable to create network socket: %s\n", strerror(errno));
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
if (bind(netsocket,(struct sockaddr *)&sin, sizeof(sin))) {
ast_log(LOG_ERROR, "Unable to bind to %s port %d: %s\n", ast_inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), strerror(errno));
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
if (option_verbose > 1)
@@ -4661,7 +4661,7 @@ static int load_module(void)
if (res) {
ast_log(LOG_ERROR, "Unable to start network thread\n");
close(netsocket);
- return -1;
+ return AST_MODULE_LOAD_DECLINE;
}
if (option_verbose > 1)
@@ -4672,7 +4672,7 @@ static int load_module(void)
ast_log(LOG_ERROR, "Unable to register DUNDi switch\n");
ast_custom_function_register(&dundi_function);
- return res;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Distributed Universal Number Discovery (DUNDi)",