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_sayunixtime.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_sayunixtime.c')
-rwxr-xr-x | apps/app_sayunixtime.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c index 960d0b55f..0abce7b8b 100755 --- a/apps/app_sayunixtime.c +++ b/apps/app_sayunixtime.c @@ -127,22 +127,23 @@ static int sayunixtime_exec(struct ast_channel *chan, void *data) int unload_module(void) { int res; - STANDARD_HANGUP_LOCALUSERS; + res = ast_unregister_application(app_sayunixtime); - if (! res) - return ast_unregister_application(app_datetime); - else - return res; + res |= ast_unregister_application(app_datetime); + + STANDARD_HANGUP_LOCALUSERS; + + return res; } int load_module(void) { int res; + res = ast_register_application(app_sayunixtime, sayunixtime_exec, sayunixtime_synopsis, sayunixtime_descrip); - if (! res) - return ast_register_application(app_datetime, sayunixtime_exec, sayunixtime_synopsis, datetime_descrip); - else - return res; + res |= ast_register_application(app_datetime, sayunixtime_exec, sayunixtime_synopsis, datetime_descrip); + + return res; } char *description(void) |