]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
since we unregister, that has not been properly registered, i standardized this.
authorClaude Patry <cpatry@gmail.com>
Sat, 10 May 2008 03:04:25 +0000 (03:04 +0000)
committerClaude Patry <cpatry@gmail.com>
Sat, 10 May 2008 03:04:25 +0000 (03:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115593 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_speex.c

index afceb9870e5e40da0109cbc0d2199c319fd6e1a3..f4d5fe412e4bb6b1df467260bc4f93cf6161e255 100644 (file)
@@ -336,16 +336,12 @@ static int unload_module(void)
 
 static int load_module(void)
 {
-       if (ast_custom_function_register(&agc_function)) {
-               return AST_MODULE_LOAD_DECLINE;
-       }
+       int res = 0;
 
-       if (ast_custom_function_register(&denoise_function)) {
-               ast_custom_function_unregister(&denoise_function);
-               return AST_MODULE_LOAD_DECLINE;
-       }
+       res |= ast_custom_function_register(&agc_function);
+       res |= ast_custom_function_register(&denoise_function);
 
-       return AST_MODULE_LOAD_SUCCESS;
+       return res;
 }
 
 AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Noise reduction and Automatic Gain Control (AGC)");