Author: czeidler Date: 2011-03-08 04:09:41 +0100 (Tue, 08 Mar 2011) New Revision: 40865 Changeset: http://dev.haiku-os.org/changeset/40865 Modified: haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp 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.h Log: Close the status window again when an error occurred durring a message fetch. Modified: haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp =================================================================== --- haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp 2011-03-08 01:50:25 UTC (rev 40864) +++ haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/IMAPInboundProtocol.cpp 2011-03-08 03:09:41 UTC (rev 40865) @@ -70,7 +70,7 @@ void DispatcherIMAPListener::FetchEnd() { - fProtocol.ResetProgress(); + fProtocol.ReportProgress(0, 1); } 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-03-08 01:50:25 UTC (rev 40864) +++ haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.cpp 2011-03-08 03:09:41 UTC (rev 40865) @@ -318,7 +318,8 @@ fMessage(firstMessage), fEndMessage(lastMessage), fOutData(NULL), - fFetchBodyLimit(fetchBodyLimit) + fFetchBodyLimit(fetchBodyLimit), + fHandled(false) { } @@ -326,7 +327,8 @@ FetchMessageCommand::~FetchMessageCommand() { - + if (!fHandled) + fIMAPMailbox.Listener().FetchEnd(); } @@ -407,6 +409,8 @@ BString lastLine; fConnectionReader.GetNextLine(lastLine); + fHandled = true; + bool bodyIsComing = true; if (fFetchBodyLimit >= 0 && fFetchBodyLimit <= messageSize) bodyIsComing = false; Modified: haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.h =================================================================== --- haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.h 2011-03-08 01:50:25 UTC (rev 40864) +++ haiku/trunk/src/add-ons/mail_daemon/inbound_protocols/imap/imap_lib/IMAPHandler.h 2011-03-08 03:09:41 UTC (rev 40865) @@ -140,6 +140,7 @@ int32 fEndMessage; BPositionIO* fOutData; int32 fFetchBodyLimit; + bool fHandled; };