[asterisk-bugs] [Asterisk 0012659]: [patch] Urgent folder specification incorrect when using IMAP storage

noreply at bugs.digium.com noreply at bugs.digium.com
Thu May 15 09:48:57 CDT 2008


The following issue requires your FEEDBACK. 
====================================================================== 
http://bugs.digium.com/view.php?id=12659 
====================================================================== 
Reported By:                jaroth
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   12659
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 116349 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             05-15-2008 09:12 CDT
Last Modified:              05-15-2008 09:48 CDT
====================================================================== 
Summary:                    [patch] Urgent folder specification incorrect when
using IMAP storage
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.
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 05-15-08 09:48  
---------------------------------------------------------------------- 
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? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-15-08 09:48  putnopvut      Note Added: 0086901                          
05-15-08 09:48  putnopvut      Status                   assigned => feedback
======================================================================




More information about the asterisk-bugs mailing list