diff options
author | Russell Bryant <russell@russellbryant.com> | 2005-10-18 22:52:21 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2005-10-18 22:52:21 +0000 |
commit | 29829640bf10b2d517c1aed12cc31deb5897285c (patch) | |
tree | 20630ce6a7b373291da39670c360ee680603aed4 /apps/app_macro.c | |
parent | 907fd55883aefce1a753e9910bacf845bb6ff71f (diff) |
it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_macro.c')
-rwxr-xr-x | apps/app_macro.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index 720e66cf9..c63886e9f 100755 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -333,17 +333,26 @@ static int macro_exit_exec(struct ast_channel *chan, void *data) int unload_module(void) { + int res; + + res = ast_unregister_application(if_app); + res |= ast_unregister_application(exit_app); + res |= ast_unregister_application(app); + STANDARD_HANGUP_LOCALUSERS; - ast_unregister_application(if_app); - ast_unregister_application(exit_app); - return ast_unregister_application(app); + + return res; } int load_module(void) { - ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip); - ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip); - return ast_register_application(app, macro_exec, synopsis, descrip); + int res; + + res = ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip); + res |= ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip); + res |= ast_register_application(app, macro_exec, synopsis, descrip); + + return res; } char *description(void) |