[svn-commits] mmichelson: branch jrothenberger/asterisk-urgent r106702 - /team/jrothenberge...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Mar 7 10:50:15 CST 2008
Author: mmichelson
Date: Fri Mar 7 10:50:14 2008
New Revision: 106702
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106702
Log:
Clean up the logic involved when prompting the user with instructions
when navigating through urgent and new messages. Also added a comment
explaining the logic.
Modified:
team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
Modified: team/jrothenberger/asterisk-urgent/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/jrothenberger/asterisk-urgent/apps/app_voicemail.c?view=diff&rev=106702&r1=106701&r2=106702
==============================================================================
--- team/jrothenberger/asterisk-urgent/apps/app_voicemail.c (original)
+++ team/jrothenberger/asterisk-urgent/apps/app_voicemail.c Fri Mar 7 10:50:14 2008
@@ -6443,15 +6443,25 @@
if (!res)
res = ast_play_and_wait(chan, "vm-opts");
} else {
- if (vms->curmsg)
+ /* Logic:
+ * If the current message is not the first OR
+ * if we're listening to the first new message and there are
+ * also urgent messages, then prompt for navigation to the
+ * previous message
+ */
+ if (vms->curmsg || (!in_urgent && vms->urgentmessages > 0))
res = ast_play_and_wait(chan, "vm-prev");
if (!res && !skipadvanced)
res = ast_play_and_wait(chan, "vm-advopts");
if (!res)
res = ast_play_and_wait(chan, "vm-repeat");
- if (!res && (vms->curmsg != vms->lastmsg))
- res = ast_play_and_wait(chan, "vm-next");
- else if (!res && in_urgent == 1 && (vms->curmsg == vms->lastmsg) && vms->newmessages > 0)
+ /* Logic:
+ * If we're not listening to the last message OR
+ * we're listening to the last urgent message and there are
+ * also new non-urgent messages, then prompt for navigation
+ * to the next message
+ */
+ if (!res && ((vms->curmsg != vms->lastmsg) || (in_urgent && vms->newmessages > 0)))
res = ast_play_and_wait(chan, "vm-next");
if (!res) {
if (!vms->deleted[vms->curmsg])
More information about the svn-commits
mailing list