]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ameliorate load and unload to dont use DECLINED or FAILED, when theres no .conf involved.
authorClaude Patry <cpatry@gmail.com>
Sat, 10 May 2008 03:28:50 +0000 (03:28 +0000)
committerClaude Patry <cpatry@gmail.com>
Sat, 10 May 2008 03:28:50 +0000 (03:28 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115594 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_jack.c
apps/app_skel.c

index 316521484e05b6b5372a6e7d2a5c92510028a0fe..2aa253f9b82e967f5a39facd0883bd8c07cae82b 100644 (file)
@@ -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");
index 8365b506ac1d500ff5844cae3865832a9ea044c3..061f1e87cfb8cdd039bb60866683d85f8896f613 100644 (file)
@@ -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");