From e0f02b46f1b18d2cdd5f218db49f9dcb1fe6d3a6 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 7 Sep 2005 19:13:00 +0000 Subject: 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 --- apps/app_hasnewvoicemail.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'apps/app_hasnewvoicemail.c') diff --git a/apps/app_hasnewvoicemail.c b/apps/app_hasnewvoicemail.c index 08bcc7ac7..6d3c13e2b 100755 --- a/apps/app_hasnewvoicemail.c +++ b/apps/app_hasnewvoicemail.c @@ -130,9 +130,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data) if (vmcount > 0) { /* Branch to the next extension */ - 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 has new voicemail, but extension %s, priority %d doesn't exist\n", vmbox, context, chan->exten, chan->priority + 101); } } else { -- cgit v1.2.3