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 16:46:22 -0500
commitf882ca25722b6290dc6e8d786452b0b26adceed1 (patch)
tree98f8862eaf958ea63650ca50900c0d43fce2a541 /codecs
parent2e9f186c179e86316fbe1b43fbda9702bddaa615 (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 c21c706f5..ec8d23622 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 6b64f8693..924ec7650 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 de9c4c4be..0a4d4b8f6 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 e262ebd71..feca8a0be 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 1954c5134..8fb1fd10b 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 a18dc0abe..b3c21912c 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 2646f49bd..026fe9ad8 100644
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -248,7 +248,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 a62eed3a8..df59dd756 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 9eda242cc..03f068323 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 58c0a895e..2246c4b57 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;