summaryrefslogtreecommitdiff
path: root/codecs
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 /codecs
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 'codecs')
-rw-r--r--codecs/codec_a_mu.c2
-rw-r--r--codecs/codec_adpcm.c2
-rw-r--r--codecs/codec_alaw.c2
-rw-r--r--codecs/codec_g722.c2
-rw-r--r--codecs/codec_g726.c2
-rw-r--r--codecs/codec_gsm.c2
-rw-r--r--codecs/codec_ilbc.c2
-rw-r--r--codecs/codec_lpc10.c2
-rw-r--r--codecs/codec_resample.c4
-rw-r--r--codecs/codec_ulaw.c2
10 files changed, 11 insertions, 11 deletions
diff --git a/codecs/codec_a_mu.c b/codecs/codec_a_mu.c
index a831abfcf..ef41a0a4a 100644
--- a/codecs/codec_a_mu.c
+++ b/codecs/codec_a_mu.c
@@ -143,7 +143,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c
index fa5d8769c..7c9c2c9a2 100644
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -348,7 +348,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c
index 515835dd7..a4cb80e7f 100644
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -132,7 +132,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_g722.c b/codecs/codec_g722.c
index d368c38af..e5d9f51a5 100644
--- a/codecs/codec_g722.c
+++ b/codecs/codec_g722.c
@@ -243,7 +243,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c
index 8b44cbbd9..e60aeb901 100644
--- a/codecs/codec_g726.c
+++ b/codecs/codec_g726.c
@@ -892,7 +892,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index f80c955a6..fc360d08f 100644
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -241,7 +241,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
index fc713beb7..bf6a09240 100644
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -269,7 +269,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index e6dcf8c99..d632c12ed 100644
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -274,7 +274,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_resample.c b/codecs/codec_resample.c
index 1c73bf3c8..b9269d166 100644
--- a/codecs/codec_resample.c
+++ b/codecs/codec_resample.c
@@ -155,7 +155,7 @@ static int load_module(void)
trans_size = ARRAY_LEN(codec_list) * (ARRAY_LEN(codec_list) - 1);
if (!(translators = ast_calloc(1, sizeof(struct ast_translator) * trans_size))) {
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
for (x = 0; x < ARRAY_LEN(codec_list); x++) {
@@ -182,7 +182,7 @@ static int load_module(void)
ast_unregister_translator won't fail.*/
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;
diff --git a/codecs/codec_ulaw.c b/codecs/codec_ulaw.c
index ca2f411f9..3075d0cc4 100644
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -183,7 +183,7 @@ static int load_module(void)
if (res) {
unload_module();
- return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_DECLINE;
}
return AST_MODULE_LOAD_SUCCESS;