mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
ameliorate load and unload to dont use DECLINED or FAILED, when theres no .conf involved.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -977,15 +977,12 @@ static int unload_module(void)
|
|||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
if (ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc))
|
int res = 0;
|
||||||
return AST_MODULE_LOAD_DECLINE;
|
|
||||||
|
|
||||||
if (ast_custom_function_register(&jack_hook_function)) {
|
res |= ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc);
|
||||||
ast_unregister_application(jack_app);
|
res |= ast_custom_function_register(&jack_hook_function);
|
||||||
return AST_MODULE_LOAD_DECLINE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return AST_MODULE_LOAD_SUCCESS;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface");
|
||||||
|
@@ -109,17 +109,12 @@ static int app_exec(struct ast_channel *chan, void *data)
|
|||||||
|
|
||||||
static int unload_module(void)
|
static int unload_module(void)
|
||||||
{
|
{
|
||||||
int res;
|
return ast_unregister_application(app);
|
||||||
res = ast_unregister_application(app);
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_module(void)
|
static int load_module(void)
|
||||||
{
|
{
|
||||||
if (ast_register_application(app, app_exec, synopsis, descrip))
|
return ast_register_application(app, app_exec, synopsis, descrip);
|
||||||
return AST_MODULE_LOAD_DECLINE;
|
|
||||||
|
|
||||||
return AST_MODULE_LOAD_SUCCESS;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
|
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application");
|
||||||
|
Reference in New Issue
Block a user