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:57:21 -0600
commit747beb1ed159f89a3b58742e4257740b3d6d6bba (patch)
tree3ba17dd62d0270a9ee976f173f948304b1733773 /codecs
parent60fd01f7f4b43515f5d4d915eec701c6054c53cf (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 ea8d01488..a2cce4ef7 100644
--- a/codecs/codec_a_mu.c
+++ b/codecs/codec_a_mu.c
@@ -141,7 +141,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 3076d264e..0b2f90f39 100644
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -346,7 +346,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 ba16936b5..ebaca74c5 100644
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -130,7 +130,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 9c868d3d9..48b5e4a27 100644
--- a/codecs/codec_g722.c
+++ b/codecs/codec_g722.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_g726.c b/codecs/codec_g726.c
index 4bf39b7ce..3b76628d5 100644
--- a/codecs/codec_g726.c
+++ b/codecs/codec_g726.c
@@ -890,7 +890,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 2ae42a6c0..296747ee3 100644
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -239,7 +239,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 16466a9c9..d691f706f 100644
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -267,7 +267,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 5f6ffff87..00e302267 100644
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -272,7 +272,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 b54f5c921..e0d530d85 100644
--- a/codecs/codec_resample.c
+++ b/codecs/codec_resample.c
@@ -153,7 +153,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++) {
@@ -180,7 +180,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 cf4e358da..e0a4f6841 100644
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -181,7 +181,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;