From 5276387f5699b81699c622f1479cd9e69fd9b481 Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Tue, 31 Aug 1999 06:52:48 +0000 Subject: [PATCH] Bug #11895 --> add protection for preventing multiple get new message calls on the same server. Don't biff if the server is alread busy. --- mailnews/base/src/nsMsgBiffManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mailnews/base/src/nsMsgBiffManager.cpp b/mailnews/base/src/nsMsgBiffManager.cpp index ff1bee730d1..1978d05e8a7 100644 --- a/mailnews/base/src/nsMsgBiffManager.cpp +++ b/mailnews/base/src/nsMsgBiffManager.cpp @@ -221,13 +221,17 @@ nsresult nsMsgBiffManager::PerformBiff() nsBiffEntry *current = (nsBiffEntry*)mBiffArray->ElementAt(i); if(current->nextBiffTime < currentTime) { + PRBool serverBusy = PR_FALSE; char *password = nsnull; // we don't want to prompt the user for password UI so pass in false to // the server->GetPassword method. If we don't already know the passsword then // we just won't biff this server current->server->GetPassword(PR_FALSE, &password); + current->server->GetServerBusy(&serverBusy); + //Make sure we're logged on before doing a biff - if(password && (nsCRT::strcmp(password, "") != 0)) + // and make sure the server isn't already in the middle of downloading new messages + if(!serverBusy && password && (nsCRT::strcmp(password, "") != 0)) current->server->PerformBiff(); mBiffArray->RemoveElementAt(i); i--; //Because we removed it we need to look at the one that just moved up.