diff options
author | George Joseph <gjoseph@digium.com> | 2017-04-12 06:47:59 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-04-12 15:57:39 -0600 |
commit | 6db0939b96017b468d2d368e67669fd02b2fdecc (patch) | |
tree | 31ea93e859375a58e9b2dce6333f24d04b2fcfb3 /formats | |
parent | 747beb1ed159f89a3b58742e4257740b3d6d6bba (diff) |
modules: change module LOAD_FAILUREs to LOAD_DECLINES (14)
Change-Id: If99e3b4fc2d7e86fc3e61182aa6c835b407ed49e
Diffstat (limited to 'formats')
-rw-r--r-- | formats/format_ogg_speex.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/formats/format_ogg_speex.c b/formats/format_ogg_speex.c index 747adb37f..331c54435 100644 --- a/formats/format_ogg_speex.c +++ b/formats/format_ogg_speex.c @@ -312,6 +312,15 @@ static struct ast_format_def speex32_f = { .desc_size = sizeof(struct speex_desc), }; +static int unload_module(void) +{ + int res = 0; + res |= ast_format_def_unregister(speex_f.name); + res |= ast_format_def_unregister(speex16_f.name); + res |= ast_format_def_unregister(speex32_f.name); + return res; +} + static int load_module(void) { speex_f.format = ast_format_speex; @@ -321,21 +330,13 @@ static int load_module(void) if (ast_format_def_register(&speex_f) || ast_format_def_register(&speex16_f) || ast_format_def_register(&speex32_f)) { - return AST_MODULE_LOAD_FAILURE; + unload_module(); + return AST_MODULE_LOAD_DECLINE; } return AST_MODULE_LOAD_SUCCESS; } -static int unload_module(void) -{ - int res = 0; - res |= ast_format_def_unregister(speex_f.name); - res |= ast_format_def_unregister(speex16_f.name); - res |= ast_format_def_unregister(speex32_f.name); - return res; -} - AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "OGG/Speex audio", .load = load_module, .unload = unload_module, |