From 747beb1ed159f89a3b58742e4257740b3d6d6bba 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 --- channels/chan_skinny.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'channels/chan_skinny.c') diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index d1c2b927a..a0530007b 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -8698,7 +8698,7 @@ static int load_module(void) ao2_ref(skinny_tech.capabilities, -1); ao2_ref(default_cap, -1); ast_log(LOG_WARNING, "Unable to create schedule context\n"); - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } /* Make sure we can register our skinny channel type */ @@ -8706,7 +8706,7 @@ static int load_module(void) ao2_ref(default_cap, -1); ao2_ref(skinny_tech.capabilities, -1); ast_log(LOG_ERROR, "Unable to register channel class 'Skinny'\n"); - return -1; + return AST_MODULE_LOAD_DECLINE; } ast_rtp_glue_register(&skinny_rtp_glue); @@ -8723,7 +8723,7 @@ static int load_module(void) ast_channel_unregister(&skinny_tech); ao2_ref(default_cap, -1); ao2_ref(skinny_tech.capabilities, -1); - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } return AST_MODULE_LOAD_SUCCESS; -- cgit v1.2.3