mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Re-introduce proper error handling that was removed in recent commits.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -977,12 +977,16 @@ static int unload_module(void)
|
|||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
int res = 0;
|
if (ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc)) {
|
||||||
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
|
||||||
res |= ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc);
|
if (ast_custom_function_register(&jack_hook_function)) {
|
||||||
res |= ast_custom_function_register(&jack_hook_function);
|
ast_unregister_application(jack_app);
|
||||||
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");
|
||||||
|
@@ -114,7 +114,8 @@ static int unload_module(void)
|
|||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
return ast_register_application(app, app_exec, synopsis, descrip);
|
return ast_register_application(app, app_exec, synopsis, descrip) ?
|
||||||
|
AST_MODULE_LOAD_DECLINE : AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
|
||||||
|
@@ -336,12 +336,16 @@ static int unload_module(void)
|
|||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
int res = 0;
|
if (ast_custom_function_register(&agc_function)) {
|
||||||
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
|
||||||
res |= ast_custom_function_register(&agc_function);
|
if (ast_custom_function_register(&denoise_function)) {
|
||||||
res |= ast_custom_function_register(&denoise_function);
|
ast_custom_function_unregister(&agc_function);
|
||||||
|
return AST_MODULE_LOAD_DECLINE;
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return AST_MODULE_LOAD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Noise reduction and Automatic Gain Control (AGC)");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Noise reduction and Automatic Gain Control (AGC)");
|
||||||
|
Reference in New Issue
Block a user