[Kde-pim] Ping/Pong Loop between Mailtransport and KMail

Kevin Krammer kevin.krammer at gmx.at
Fri Jul 16 19:29:26 BST 2010


On Friday, 2010-07-16, Kevin Krammer wrote:
> On Friday, 2010-07-16, Kevin Krammer wrote:
> > Hi all,
> > 
> > while debugging Mailtransport related problems, I discovered a nice
> > ping/pong inside KMail.
> > 
> > This is what happens:
> > 
> > 1) KMail's ETM lists a folder
> > 2) Akonadi synchronizes the collection
> > 3) KMKernel::instanceStatusChanged() goes "oooh, mail is being checked"
> > 4) when "mail check" ends, KMMainWidget::slotEndCheckMail() decides to
> > send queued messages
> > 
> > So far so good
> > 
> > 5) DispatcherInterface creates a FilterActionJob
> > 6) FilterActionJob does and ItemFetchJob on the outbox
> > 7) Akonadi synchronizes the outbox
> > 8) -> (3)
> > 
> > Not sure where to fix this though.
> > The most problematic part seems to be in
> > KMKernel::instanceStatusChanged(). Any of its agents switching to state
> > "Running" is considered a mail check in progress.
> 
> It is basically a side effect of progress reporting, extened by Laurent in
> revision 1138325.
> 
> EnumSendOnCheck::SendOnManualChecks could probably be moved out of
> KMMainWidget::slotEndCheckMail() and triggered by the GUI action itself
> (would then run in parallel to the mail check)
> 
> EnumSendOnCheck::SendOnAllChecks could probably be removed, assuming the
> mail dispatcher agent has some kind of interval checking for queued mails.
> It is not exactly the same behavior, e.g. happens more often if the
> dispatcher timeout is shorter than the check timeouts.

Wrong assumption on my part, "Send later" requires sending on mail check.

This seems to work though:

Index: mailtransport/outboxactions.cpp
===================================================================
--- mailtransport/outboxactions.cpp     (revision 1150714)
+++ mailtransport/outboxactions.cpp     (working copy)
@@ -46,6 +46,7 @@
   ItemFetchScope scope;
   scope.fetchFullPayload( false );
   scope.fetchAttribute<DispatchModeAttribute>();
+  scope.setCacheOnly( true );
   return scope;
 }

New assumption is that items which can possibly be sent have been added to 
Akonadi already.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100716/66d1c6b8/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