[asterisk-bugs] [Asterisk 0017306]: Sequencing numbers of IMAP email messages is incorrect

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 10 22:30:02 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17306 
====================================================================== 
Reported By:                uxbod
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17306
Category:                   Applications/app_voicemail/IMAP
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           1.6.2.6 
JIRA:                       SWP-1432 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-05-07 08:28 CDT
Last Modified:              2010-05-10 22:30 CDT
====================================================================== 
Summary:                    Sequencing numbers of IMAP email messages is
incorrect
Description: 
Left six voicemails which were all successfully delivered to the IMAP
server.  On checking them the sequence numbers were not sequential.  Screen
shot attached.
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0017135 Message count incorrect
child of            0016350 Deleting Multiple IMAP voicemails does ...
====================================================================== 

---------------------------------------------------------------------- 
 (0121681) uxbod (reporter) - 2010-05-10 22:30
 https://issues.asterisk.org/view.php?id=17306#c121681 
---------------------------------------------------------------------- 
Took another look and it would appear that __messagecount() is accessed via
the method messagecount(); which that function does not look correct:

static int messagecount(const char *context, const char *mailbox, const
char *folder)
{
        if (ast_strlen_zero(folder) || !strcmp(folder, "INBOX")) {
                return __messagecount(context, mailbox, "INBOX") +
__messagecount(context, mailbox, "Urgent");
        } else {
                return __messagecount(context, mailbox, folder);
        }
}


If you have specified a folder that is *NOT* called INBOX then should it
not be using __messagecount() in the else section of the IF statement?  I
am assuming the code should in-fact be:

static int messagecount(const char *context, const char *mailbox, const
char *folder)
{
        if (ast_strlen_zero(folder) || strcmp(folder, "INBOX")) {
                return __messagecount(context, mailbox, "INBOX") +
__messagecount(context, mailbox, "Urgent");
        } else {
                return __messagecount(context, mailbox, folder);
        }
} 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-05-10 22:30 uxbod          Note Added: 0121681                          
======================================================================




More information about the asterisk-bugs mailing list