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 --- tests/test_bucket.c | 2 +- tests/test_channel_feature_hooks.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/test_bucket.c b/tests/test_bucket.c index 2b6e059c3..2cf5267c1 100644 --- a/tests/test_bucket.c +++ b/tests/test_bucket.c @@ -1012,7 +1012,7 @@ static int load_module(void) if (ast_bucket_scheme_register("test", &bucket_test_wizard, &bucket_file_test_wizard, ast_bucket_file_temporary_create, ast_bucket_file_temporary_destroy)) { ast_log(LOG_ERROR, "Failed to register Bucket test wizard scheme implementation\n"); - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } AST_TEST_REGISTER(bucket_scheme_register); diff --git a/tests/test_channel_feature_hooks.c b/tests/test_channel_feature_hooks.c index c9fdf0983..a32548458 100644 --- a/tests/test_channel_feature_hooks.c +++ b/tests/test_channel_feature_hooks.c @@ -345,7 +345,7 @@ static int load_module(void) { test_features_chan_tech.capabilities = ast_format_cap_alloc(AST_FORMAT_CAP_FLAG_DEFAULT); if (!test_features_chan_tech.capabilities) { - return AST_MODULE_LOAD_FAILURE; + return AST_MODULE_LOAD_DECLINE; } ast_format_cap_append(test_features_chan_tech.capabilities, TEST_CHANNEL_FORMAT, 0); ast_channel_register(&test_features_chan_tech); -- cgit v1.2.3