From 17f4b18ab9d03dd170bfe38704bf1df8541438a1 Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Sat, 15 May 1999 02:26:36 +0000 Subject: [PATCH] fix get new mail when using cached connection --- mailnews/imap/src/nsImapProtocol.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mailnews/imap/src/nsImapProtocol.cpp b/mailnews/imap/src/nsImapProtocol.cpp index 9063f5a4ac3..4496ae061bb 100644 --- a/mailnews/imap/src/nsImapProtocol.cpp +++ b/mailnews/imap/src/nsImapProtocol.cpp @@ -913,6 +913,15 @@ nsresult nsImapProtocol::LoadUrl(nsIURL * aURL, nsISupports * aConsumer) if (m_transport && m_runningUrl) { + nsIImapUrl::nsImapAction imapAction; + m_runningUrl->GetImapAction(&imapAction); + + // if we're running a select or delete all, do a noop first. + // this should really be in the connection cache code when we know + // we're pulling out a selected state connection, but maybe we + // can get away with this. + m_needNoop = (imapAction == nsIImapUrl::nsImapSelectFolder || imapAction == nsIImapUrl::nsImapDeleteAllMsgs); + PRBool transportOpen = PR_FALSE; m_transport->IsTransportOpen(&transportOpen); if (transportOpen == PR_FALSE) @@ -3956,7 +3965,7 @@ void nsImapProtocol::Logout() nsString2 command(GetServerCommandTag(), eOneByte); - command.Append("logout" CRLF); + command.Append(" logout" CRLF); SendData(command.GetBuffer()); @@ -3970,7 +3979,7 @@ void nsImapProtocol::Noop() IncrementCommandTagNumber(); nsString2 command(GetServerCommandTag(), eOneByte); - command.Append("noop" CRLF); + command.Append(" noop" CRLF); SendData(command.GetBuffer());