[haiku-commits] r41091 - haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3

  • From: clemens.zeidler@xxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 23 Mar 2011 03:02:21 +0100 (CET)

Author: czeidler
Date: 2011-03-23 03:02:20 +0100 (Wed, 23 Mar 2011)
New Revision: 41091
Changeset: https://dev.haiku-os.org/changeset/41091
Ticket: https://dev.haiku-os.org/ticket/7400

Modified:
   haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp
Log:
Take leave mail on server into account. Should fix #7400.



Modified: haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp
===================================================================
--- haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp 
2011-03-23 00:47:21 UTC (rev 41090)
+++ haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3/pop3.cpp 
2011-03-23 02:02:20 UTC (rev 41091)
@@ -155,13 +155,11 @@
                return error;
        }
 
-       int32   num_messages;
-
        BStringList toDownload;
        fManifest.NotHere(fUniqueIDs, &toDownload);
 
-       num_messages = toDownload.CountItems();
-       if (num_messages == 0) {
+       int32 numMessages = toDownload.CountItems();
+       if (numMessages == 0) {
                CheckForDeletedMessages();
                ResetProgress();
                return B_OK;
@@ -234,6 +232,12 @@
                // save manifest in case we get disturbed
                fManifest += uid;
                _WriteManifest();
+
+               bool leaveOnServer;
+               if (fSettings.FindBool("leave_mail_on_server", &leaveOnServer) 
== B_OK
+                       && !leaveOnServer) {
+                       Delete(toRetrieve);
+               }
        }
 
        ResetProgress();
@@ -814,6 +818,9 @@
 #if DEBUG
        puts(fLog.String());
 #endif
+       /* The mail is just marked as deleted and removed from the server when
+       sending the QUIT command. Because of that the message number stays the 
same
+       and we keep the uid in the uid list. */
 }
 
 


Other related posts:

  • » [haiku-commits] r41091 - haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/pop3 - clemens . zeidler