diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 22:52:21 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-18 22:52:21 +0000 |
commit | 2c83f05ebb3060c268c396b5c5fe6a6f7f20a638 (patch) | |
tree | 20630ce6a7b373291da39670c360ee680603aed4 /apps/app_osplookup.c | |
parent | 01ddee76b0828acb3407d556191b7ca60fb73fea (diff) |
it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6828 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_osplookup.c')
-rwxr-xr-x | apps/app_osplookup.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c index dfd819d2b..d141ae14e 100755 --- a/apps/app_osplookup.c +++ b/apps/app_osplookup.c @@ -243,26 +243,25 @@ static int ospfinished_exec(struct ast_channel *chan, void *data) int unload_module(void) { int res; - STANDARD_HANGUP_LOCALUSERS; + res = ast_unregister_application(app3); res |= ast_unregister_application(app2); res |= ast_unregister_application(app); + + STANDARD_HANGUP_LOCALUSERS; + return res; } int load_module(void) { int res; + res = ast_register_application(app, osplookup_exec, synopsis, descrip); - if (res) - return(res); - res = ast_register_application(app2, ospnext_exec, synopsis2, descrip2); - if (res) - return(res); - res = ast_register_application(app3, ospfinished_exec, synopsis3, descrip3); - if (res) - return(res); - return(0); + res |= ast_register_application(app2, ospnext_exec, synopsis2, descrip2); + res |= ast_register_application(app3, ospfinished_exec, synopsis3, descrip3); + + return res; } int reload(void) |