[haiku-commits] r40635 - haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib

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

Author: czeidler
Date: 2011-02-23 03:25:22 +0100 (Wed, 23 Feb 2011)
New Revision: 40635
Changeset: http://dev.haiku-os.org/changeset/40635

Modified:
   
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.cpp
   
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPMailbox.cpp
Log:
- Don't download messages flaged as deleted.
- Set watching variable when leaving the watching method.



Modified: 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.cpp
===================================================================
--- 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.cpp
 2011-02-23 02:08:03 UTC (rev 40634)
+++ 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.cpp
 2011-02-23 02:25:22 UTC (rev 40635)
@@ -192,8 +192,6 @@
 bool
 FetchMinMessageCommand::Handle(const BString& response)
 {
-       if (response.FindFirst("FETCH") < 0)
-               return false;
        BString extracted = response;
        int32 message;
        if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
@@ -210,6 +208,9 @@
        if (!ParseMinMessage(extracted, minMessage))
                return false;
 
+       if ((minMessage.flags & kDeleted) != 0)
+               return true;
+
        fMinMessageList->push_back(minMessage);
        fStorage.AddNewMessage(minMessage.uid, minMessage.flags, fData);
        return true;
@@ -284,8 +285,6 @@
 bool
 FetchMessageListCommand::Handle(const BString& response)
 {
-       if (response.FindFirst("FETCH") < 0)
-               return false;
        BString extracted = response;
        int32 message;
        if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))
@@ -295,6 +294,9 @@
        if (!FetchMinMessageCommand::ParseMinMessage(extracted, minMessage))
                return false;
 
+       if ((minMessage.flags & kDeleted) != 0)
+               return true;
+
        fMinMessageList->push_back(minMessage);
        return true;
 }
@@ -345,8 +347,6 @@
 bool
 FetchMessageCommand::Handle(const BString& response)
 {
-       if (response.FindFirst("FETCH") < 0)
-               return false;
        BString extracted = response;
        int32 message;
        if (!IMAPParser::RemoveUntagedFromLeft(extracted, "FETCH", message))

Modified: 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPMailbox.cpp
===================================================================
--- 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPMailbox.cpp
 2011-02-23 02:08:03 UTC (rev 40634)
+++ 
haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPMailbox.cpp
 2011-02-23 02:25:22 UTC (rev 40635)
@@ -157,6 +157,7 @@
                if (status != B_OK)
                        break;
        }
+       atomic_set(&fWatching, 0);
        return status;
 }
 


Other related posts:

  • » [haiku-commits] r40635 - haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib - clemens . zeidler