diff options
author | junky <junky@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-10 03:28:50 +0000 |
---|---|---|
committer | junky <junky@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-10 03:28:50 +0000 |
commit | 2939dd5f9d936b3cb8aa5c41a1d61821e01375f3 (patch) | |
tree | ae75d829dc1c8de003e650ea963b6ad03843e846 | |
parent | a3a5ab6ce0f37789cd77a9b5d968678be5da9391 (diff) |
ameliorate load and unload to dont use DECLINED or FAILED, when theres no .conf involved.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115594 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_jack.c | 11 | ||||
-rw-r--r-- | apps/app_skel.c | 9 |
2 files changed, 6 insertions, 14 deletions
diff --git a/apps/app_jack.c b/apps/app_jack.c index 316521484..2aa253f9b 100644 --- a/apps/app_jack.c +++ b/apps/app_jack.c @@ -977,15 +977,12 @@ static int unload_module(void) static int load_module(void) { - if (ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc)) - return AST_MODULE_LOAD_DECLINE; + int res = 0; - if (ast_custom_function_register(&jack_hook_function)) { - ast_unregister_application(jack_app); - return AST_MODULE_LOAD_DECLINE; - } + res |= ast_register_application(jack_app, jack_exec, jack_synopsis, jack_desc); + res |= ast_custom_function_register(&jack_hook_function); - return AST_MODULE_LOAD_SUCCESS; + return res; } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "JACK Interface"); diff --git a/apps/app_skel.c b/apps/app_skel.c index 8365b506a..061f1e87c 100644 --- a/apps/app_skel.c +++ b/apps/app_skel.c @@ -109,17 +109,12 @@ static int app_exec(struct ast_channel *chan, void *data) static int unload_module(void) { - int res; - res = ast_unregister_application(app); - return res; + return ast_unregister_application(app); } static int load_module(void) { - if (ast_register_application(app, app_exec, synopsis, descrip)) - return AST_MODULE_LOAD_DECLINE; - - return AST_MODULE_LOAD_SUCCESS; + return ast_register_application(app, app_exec, synopsis, descrip); } AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skeleton (sample) Application"); |