[asterisk-commits] russell: branch 1.4 r255322 - /branches/1.4/pbx/pbx_dundi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 30 11:06:11 CDT 2010
Author: russell
Date: Tue Mar 30 11:06:06 2010
New Revision: 255322
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=255322
Log:
Don't make Asterisk not start if pbx_dundi fails to initialize.
Modified:
branches/1.4/pbx/pbx_dundi.c
Modified: branches/1.4/pbx/pbx_dundi.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/pbx/pbx_dundi.c?view=diff&rev=255322&r1=255321&r2=255322
==============================================================================
--- branches/1.4/pbx/pbx_dundi.c (original)
+++ branches/1.4/pbx/pbx_dundi.c Tue Mar 30 11:06:06 2010
@@ -4634,7 +4634,7 @@
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 @@
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 @@
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 @@
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)",
More information about the asterisk-commits
mailing list