summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-07-17 22:30:28 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-07-17 22:30:28 +0000
commit40ce5e0d18520cd7a440cd8849e3e920be68f471 (patch)
tree5499af489ac45954318119e4294811be3da06dff /apps
parentda1902cdc060763a712bb1586cfca5ec1e9a2c49 (diff)
Change ast_hangup() to return void and be NULL safe.
Since ast_hangup() is effectively a channel destructor, it should be a void function. * Make the few silly callers checking the return value no longer do so. Only the CDR and CEL unit tests checked the return value. * Make all callers take advantage of the NULL safe change and remove the NULL check before the call. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_meetme.c6
-rw-r--r--apps/app_voicemail.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 70719608b..0dee92647 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -2368,10 +2368,8 @@ static int conf_free(struct ast_conference *conf)
if (conf->origframe)
ast_frfree(conf->origframe);
- if (conf->lchan)
- ast_hangup(conf->lchan);
- if (conf->chan)
- ast_hangup(conf->chan);
+ ast_hangup(conf->lchan);
+ ast_hangup(conf->chan);
if (conf->fd >= 0)
close(conf->fd);
if (conf->recordingfilename) {
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 95265b5b1..df7f1b2dd 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -13780,9 +13780,7 @@ AST_TEST_DEFINE(test_voicemail_vmsayname)
exit_vmsayname_test:
- if (test_channel1) {
- ast_hangup(test_channel1);
- }
+ ast_hangup(test_channel1);
return res ? AST_TEST_FAIL : AST_TEST_PASS;
}