[Kde-pim] [PATCH] Fix IMAP filtering in 3.5 branch

Ingo Klöcker kloecker at kde.org
Sun Feb 10 23:03:49 GMT 2008


On Sunday 10 February 2008, Till Adam wrote:
> Ingo,
>
> On Saturday 09 February 2008 23:49:16 Ingo Klöcker wrote:
> > for me client-side IMAP filtering is broken. When checking an IMAP
> > account for new mail only the first message is filtered. Afterwards
> > filtering stops and will not start again before the next restart of
> > KMail.
> >
> > The attached patch fixes the problem by reverting the changes from
> > revision 650963. I don't know what commit 650963 (which is a merge
> > of commit 647870 by coolo with the comment "do not munge with open
> > counts, but simply close and let ticket owners reopen on closed( )
> > signal") was supposed to fix, but I haven't noticed any problems
> > since I've reverted the patch. Unless somebody can quickly fix the
> > problem that was introduced with the aforementioned commit, we
> > should revert the commit so that IMAP filtering works with KDE
> > 3.5.9.
> >
> > If nobody objects then I'll revert the commit tomorrow.
>
> I've tried to reproduce this with current enterprise, which also has
> the patch, and couldn't. The kubuntu folks, who had reported the same
> could not either. Can you tell me a bit more about what kinds of
> filter you use, or maybe even narrow it down to those filters which
> trigger it for you? I have some time today and would like to track
> this down, if at all possible.

With Till's guidance I've been able to track down and squash this nasty 
bug (with revision 773384). It wasn't a pleasant sight.

The problem was that mSrcFolder was closed (because it was expunged) 
after the first message had been filtered. Due to coolo's changes it 
was the responsibility of the ActionScheduler to re-open the folder. 
The folder is now re-opened in a slot connected to the closed() and the 
expunged() signals of mSrcFolder. This fixed the problem.

My first try involved just listening to the closed() signal. But that 
didn't work because for some reason the closed() signal is not emitted 
when the folder is expunged (although it is emitted in the two other 
cases where the folder is forcibly closed, i.e. when the folder is 
renamed or removed). IMO this is a bug. The closed() signal must always 
be emitted when the folder is closed.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080211/4286ebdf/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list