From: Russell Bryant Date: Tue, 30 Mar 2010 16:06:06 +0000 (+0000) Subject: Don't make Asterisk not start if pbx_dundi fails to initialize. X-Git-Tag: 1.4.31-rc1~2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=013e28dda7edd796af6d3dca8011a7b6c2c3ae06;p=thirdparty%2Fasterisk.git Don't make Asterisk not start if pbx_dundi fails to initialize. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@255322 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 4b7e25636b..d56b543bc2 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)",