summaryrefslogtreecommitdiff
path: root/apps/app_voicemail.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-09-07 19:13:00 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-09-07 19:13:00 +0000
commite0f02b46f1b18d2cdd5f218db49f9dcb1fe6d3a6 (patch)
tree09d54e0b28af50c87bac02b87c93c36feb721cf9 /apps/app_voicemail.c
parent1bd1a35a9affaea7bd47d81bc022194c8559b8f0 (diff)
convert a bunch of apps to use ast_goto_if_exists() (issue #5138)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_voicemail.c')
-rwxr-xr-xapps/app_voicemail.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c9003c6e8..ebed7dd49 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5474,9 +5474,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
if (res == ERROR_LOCK_PATH) {
ast_log(LOG_ERROR, "Could not leave voicemail. The path is already locked.\n");
/*Send the call to n+101 priority, where n is the current priority*/
- if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num))
- chan->priority+=100;
- else
+ if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "Extension %s, priority %d doesn't exist.\n", chan->exten, chan->priority + 101);
res = 0;
}
@@ -5542,9 +5540,7 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
}
if (find_user(&svm, context, box)) {
- if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_num)) {
- chan->priority += 100;
- } else
+ if (!ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101))
ast_log(LOG_WARNING, "VM box %s@%s exists, but extension %s, priority %d doesn't exist\n", box, context, chan->exten, chan->priority + 101);
}
LOCAL_USER_REMOVE(u);