Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


bugtrack at dbmail

Jul 26, 2012, 8:18 AM

Post #1 of 3 (452 views)
Permalink
[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved

The following issue has been SUBMITTED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=978
======================================================================
Reported By: fabiangergely
Assigned To:
======================================================================
Project: DBMail
Issue ID: 978
Category: IMAP daemon
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 26-Jul-12 17:18 CEST
Last Modified: 26-Jul-12 17:18 CEST
======================================================================
Summary: List command returns folder with \Noselect when it
has no such flag saved
Description:
If I create a specific hierarchy of folders (below), and
mailboxes_by_regex() returns matching folders in a given order (depends on
database, and the exact data), then the "target folder" will be returned
with the \Noselect flag, even though it does not have this flag saved in
the database.
This is reproducible just if I use the '%' wildcard.

Example:

.. list "Test another/" "%"
* LIST (\noselect \haschildren) "/" "Test another/test"
.. OK LIST completed
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
26-Jul-12 17:18 fabiangergely New Issue
26-Jul-12 17:18 fabiangergely File Added: 0001-Imapcommands.c-debugging.patch

======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Jul 26, 2012, 8:44 AM

Post #2 of 3 (424 views)
Permalink
[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=978
======================================================================
Reported By: fabiangergely
Assigned To:
======================================================================
Project: DBMail
Issue ID: 978
Category: IMAP daemon
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 26-Jul-12 17:18 CEST
Last Modified: 26-Jul-12 17:44 CEST
======================================================================
Summary: List command returns folder with \Noselect when it
has no such flag saved
Description:
If I create a specific hierarchy of folders (below), and
mailboxes_by_regex() returns matching folders in a given order (depends on
database, and the exact data), then the "target folder" will be returned
with the \Noselect flag, even though it does not have this flag saved in
the database.
This is reproducible just if I use the '%' wildcard.

Example:

.. list "Test another/" "%"
* LIST (\noselect \haschildren) "/" "Test another/test"
.. OK LIST completed
======================================================================

----------------------------------------------------------------------
(0003464) fabiangergely (reporter) - 26-Jul-12 17:44
http://www.dbmail.org/mantis/view.php?id=978#c3464
----------------------------------------------------------------------
The attached patch is one solution to the problem. It orders the folders
returned by dm_db.c/mailboxes_by_regex(), so that parent folders always
appear before their children. Then the bug cannot be reproduced.
An alternative solution would be to give folder names originating from
partial matches a lower "priority", so that they wouldn't mask out real
folders (with priority queue or two lists).

Issue History
Date Modified Username Field Change
======================================================================
26-Jul-12 17:18 fabiangergely New Issue
26-Jul-12 17:18 fabiangergely File Added: 0001-Imapcommands.c-debugging.patch

26-Jul-12 17:40 fabiangergely File Added:
0001-IMAP-fix-unexpected-Noselect-in-list-command-respons.patch

26-Jul-12 17:44 fabiangergely Note Added: 0003464
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev


bugtrack at dbmail

Jul 31, 2012, 8:32 AM

Post #3 of 3 (418 views)
Permalink
[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=978
======================================================================
Reported By: fabiangergely
Assigned To:
======================================================================
Project: DBMail
Issue ID: 978
Category: IMAP daemon
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 26-Jul-12 17:18 CEST
Last Modified: 31-Jul-12 17:32 CEST
======================================================================
Summary: List command returns folder with \Noselect when it
has no such flag saved
Description:
If I create a specific hierarchy of folders (below), and
mailboxes_by_regex() returns matching folders in a given order (depends on
database, and the exact data), then the "target folder" will be returned
with the \Noselect flag, even though it does not have this flag saved in
the database.
This is reproducible just if I use the '%' wildcard.

Example:

.. list "Test another/" "%"
* LIST (\noselect \haschildren) "/" "Test another/test"
.. OK LIST completed
======================================================================

----------------------------------------------------------------------
(0003464) fabiangergely (reporter) - 26-Jul-12 17:45
http://www.dbmail.org/mantis/view.php?id=978#c3464
----------------------------------------------------------------------
The attached patch
(0001-IMAP-fix-unexpected-Noselect-in-list-command-respons.patch) is one
solution to the problem. It orders the folders returned by
dm_db.c/mailboxes_by_regex(), so that parent folders always appear before
their children. Then the bug cannot be reproduced.
An alternative solution would be to give folder names originating from
partial matches a lower "priority", so that they wouldn't mask out real
folders (with priority queue or two lists).



----------------------------------------------------------------------
(0003465) fabiangergely (reporter) - 31-Jul-12 17:32
http://www.dbmail.org/mantis/view.php?id=978#c3465
----------------------------------------------------------------------
The attached patch
(0001-IMAP-fix-hierarchy-elements-masking-out-real-folders.patch) is
another (in my opinion better) fix for the problem.
It creates two trees in the _ic_list_enter, one for found the real
folders, and one for found hierarchy elements. Then adds all found
hierarchy elements to found real folders (assuming they are not there
already). This way real folders get a higher priority, so hierarchy names
cannot "mask" them out.
The patch also includes a test suite written in Ruby, that should
reproduce the problem with unchanged C code (ie: the test should fail
then). Of course with the changes in the patch the test passes.

Issue History
Date Modified Username Field Change
======================================================================
26-Jul-12 17:18 fabiangergely New Issue
26-Jul-12 17:18 fabiangergely File Added: 0001-Imapcommands.c-debugging.patch

26-Jul-12 17:40 fabiangergely File Added:
0001-IMAP-fix-unexpected-Noselect-in-list-command-respons.patch

26-Jul-12 17:44 fabiangergely Note Added: 0003464
26-Jul-12 17:45 fabiangergely Note Edited: 0003464
31-Jul-12 17:27 fabiangergely File Added:
0001-IMAP-fix-hierarchy-elements-masking-out-real-folders.patch

31-Jul-12 17:32 fabiangergely Note Added: 0003465
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.