summaryrefslogtreecommitdiff
path: root/main/loader.c
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-04-11 10:07:39 -0600
committerGeorge Joseph <gjoseph@digium.com>2017-04-12 15:47:56 -0600
commitcc668bd522fceb9cb6cd0d69f5e29c28f1835b2a (patch)
treef4ea57201c41cde4cf2a326d400eed2e41179b52 /main/loader.c
parent0986618c94cbe0e2d95354f867c6cc966758a025 (diff)
modules: change module LOAD_FAILUREs to LOAD_DECLINES
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting if a module can't be loaded. If the user wishes to retain the FAILURE behavior for a specific module, they can use the "require" or "preload-require" keyword in modules.conf. A new API was added to logger: ast_is_logger_initialized(). This allows asterisk.c/check_init() to print to the error log once the logger subsystem is ready instead of just to stdout. If something does fail before the logger is initialized, we now print to stderr instead of stdout. Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
Diffstat (limited to 'main/loader.c')
-rw-r--r--main/loader.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/loader.c b/main/loader.c
index 9beaf4d33..327bb528f 100644
--- a/main/loader.c
+++ b/main/loader.c
@@ -1245,6 +1245,7 @@ static int load_resource_list(struct load_order *load_order, unsigned int global
case AST_MODULE_LOAD_DECLINE:
break;
case AST_MODULE_LOAD_FAILURE:
+ ast_log(LOG_ERROR, "*** Failed to load module %s\n", mod->resource);
res = -1;
goto done;
case AST_MODULE_LOAD_SKIP: