[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Bug#19472: kmail deletes unknown messages on server
From:       Don Sanders <sanders () kde ! org>
Date:       2001-01-31 18:43:09
[Download RAW message or body]

Michael,

Continuing my earlier note on this bug I think we need to do something like 
this:

diff -u -b -r1.48 kmacctexppop.cpp
--- kmacctexppop.cpp    2001/01/16 12:38:38     1.48
+++ kmacctexppop.cpp    2001/01/31 18:39:03
@@ -402,6 +402,15 @@
 
 void KMAcctExpPop::slotCancel()
 {
+  QValueList<KMMessage*>::Iterator last = msgsAwaitingProcessing.fromLast();
+  QStringList::Iterator lastId = msgIdsAwaitingProcessing.fromLast();
+  QStringList::Iterator lastUid = msgUidsAwaitingProcessing.fromLast();
+  if (last != msgsAwaitingProcessing.end()) {
+      msgsAwaitingProcessing.remove( last );
+      msgIdsAwaitingProcessing.remove( lastId );
+      msgUidsAwaitingProcessing.remove( lastUid );
+  }
+
   idsOfMsgsPendingDownload.clear();
   lensOfMsgsPendingDownload.clear();
   processRemainingQueuedMessagesAndSaveUidList();

The problem is when the connection is lost while downloading a message. 
slotResult gets called, calls slotCancel, calls 
processRemainingQueuedMessagesAndSaveUidList which calls 
processPendingMessages which processes the partially downloaded message and 
appends its uid to uidsOfNextSeenMsgs. This list is saved and the next time a 
connectin is established all these messages (including the partially 
downloaded one) are deleted.

I haven't tested this patch yet though.

BFN,
DOn.

On Wednesday 31 January 2001 17:39, Michael Häckel wrote:
> On Wednesday, 31. January 2001 16:15, fkruse@gmx.de wrote:
> > I tried to get my mails from pop.gmx.net.
> > But kmail disconnected without reason and deleted the mails on the server
> > without having downloaded them into the application.
>
> KMail doesn't disconnect without a reason, but because of a timeout which
> has been heavily increased already because of some slow freemail providers.
> The problem should be solved with that.
>
> > I can reproduce that bug especially when receiving larger attachments.
> > The problem is not GMX, because this function works well with Netscape
> > messenger.
>
> KMail deletes the mails it thinks to have already on the next mail check,
> because many people reported the problem, that KMail otherwise downloads
> them again.
> For the case the download is interrupted due to a timeout, there seems to
> be an off by one error, at least there was a similar report some time ago.
> On the other hand, as far as I remember that report was also with gmx.net
> and the user recieved at least a part of the mail.
>
> Regards,
> Michael Häckel
>
> _______________________________________________
> Kmail Developers mailing list
> Kmail@master.kde.org
> http://master.kde.org/mailman/listinfo/kmail
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic