Close the status window again when an error occurred durring a message fetch.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40865 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Clemens Zeidler 2011-03-08 03:09:41 +00:00
parent c45c76e658
commit 548402bb7c
3 changed files with 8 additions and 3 deletions

View File

@ -70,7 +70,7 @@ DispatcherIMAPListener::NewMessagesToFetch(int32 nMessages)
void
DispatcherIMAPListener::FetchEnd()
{
fProtocol.ResetProgress();
fProtocol.ReportProgress(0, 1);
}

View File

@ -318,7 +318,8 @@ FetchMessageCommand::FetchMessageCommand(IMAPMailbox& mailbox,
fMessage(firstMessage),
fEndMessage(lastMessage),
fOutData(NULL),
fFetchBodyLimit(fetchBodyLimit)
fFetchBodyLimit(fetchBodyLimit),
fHandled(false)
{
}
@ -326,7 +327,8 @@ FetchMessageCommand::FetchMessageCommand(IMAPMailbox& mailbox,
FetchMessageCommand::~FetchMessageCommand()
{
if (!fHandled)
fIMAPMailbox.Listener().FetchEnd();
}
@ -407,6 +409,8 @@ FetchMessageCommand::Handle(const BString& response)
BString lastLine;
fConnectionReader.GetNextLine(lastLine);
fHandled = true;
bool bodyIsComing = true;
if (fFetchBodyLimit >= 0 && fFetchBodyLimit <= messageSize)
bodyIsComing = false;

View File

@ -140,6 +140,7 @@ private:
int32 fEndMessage;
BPositionIO* fOutData;
int32 fFetchBodyLimit;
bool fHandled;
};