From f882ca25722b6290dc6e8d786452b0b26adceed1 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Tue, 11 Apr 2017 10:07:39 -0600 Subject: 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 --- cdr/cdr_custom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cdr/cdr_custom.c') diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c index 6ef2cb094..eb34ba06a 100644 --- a/cdr/cdr_custom.c +++ b/cdr/cdr_custom.c @@ -205,7 +205,7 @@ static enum ast_module_load_result load_module(void) { if (AST_RWLIST_WRLOCK(&sinks)) { ast_log(LOG_ERROR, "Unable to lock sink list. Load failed.\n"); - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } load_config(); @@ -218,7 +218,7 @@ static int reload(void) { if (AST_RWLIST_WRLOCK(&sinks)) { ast_log(LOG_ERROR, "Unable to lock sink list. Load failed.\n"); - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } free_config(); -- cgit v1.2.3