[Home]

Summary:ASTERISK-12025: [patch] Urgent folder specification incorrect when using IMAP storage
Reporter:James Rothenberger (jaroth)Labels:
Date Opened:2008-05-15 09:12:00Date Closed:2008-05-15 10:34:41
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_voicemail
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) urgentfolder_v2.patch
( 1) urgentfolder.patch
Description:The messagecount() method uses an IMAP folder called "<mailbox>/Urgent" instead of counting messages with the Urgent flag in INBOX.  This patch uses INBOX to count urgent messages.
Comments:By: Mark Michelson (mmichelson) 2008-05-15 09:48:57

The patch seems fine except it appears that the folder numbers are a bit mixed up at the bottom of the messagecount function.

What I mean is that you set fold to 0 if the urgent folder was specified, but then later you have checks like

if (fold == 1 && urgent == 1)

which can never be true and

if (fold == 1 && urgent == 0)

which will always be true if fold is 1. I think what was intended was something like this

if (fold == 0 && urgent == 1)
   vms_p->urgentmessages = vms_p->vmArrayIndex;
else if (fold == 0 && urgent == 0)
   vms_p->newmessages = vms_p->vmArrayIndex;
else if (fold == 1)
   vms_p->oldmessages = vms_p->vmArrayIndex;

Am I right here or have I missed something?

By: James Rothenberger (jaroth) 2008-05-15 09:56:43

You are correct.  The updated patch is posted.

By: Digium Subversion (svnbot) 2008-05-15 10:34:40

Repository: asterisk
Revision: 116594

U   trunk/apps/app_voicemail.c

------------------------------------------------------------------------
r116594 | mmichelson | 2008-05-15 10:34:40 -0500 (Thu, 15 May 2008) | 12 lines

When counting urgent messages when using IMAP storage, take into account that
the urgent messages are not in their own folder but are actually "flagged" messages
in the INBOX.


(closes issue ASTERISK-12025)
Reported by: jaroth
Patches:
     urgentfolder_v2.patch uploaded by jaroth (license 50)
Tested by: jaroth


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=116594