From 2cb76b98367adea3f2ba1e0fad8d4b54ea668ba8 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 26 Sep 2000 22:37:13 +0000 Subject: [PATCH] fix for nsbeta3++ bug #2203. the problem was we were calling CreateIncomingServer() before the accounts were loaded. To solve this, I put a safe call to LoadAccounts() at the start of CreateIncomingServer(). looking at the checkin logs, mscott made the same fix a while ago, but it got overwritten by another change. r/a=mscott git-svn-id: svn://10.0.0.236/branches/Netscape_20000922_BRANCH@79982 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/base/src/nsMsgAccountManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mozilla/mailnews/base/src/nsMsgAccountManager.cpp b/mozilla/mailnews/base/src/nsMsgAccountManager.cpp index 580cd5bb6cd..df37dc1db49 100644 --- a/mozilla/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mozilla/mailnews/base/src/nsMsgAccountManager.cpp @@ -59,7 +59,7 @@ #include "nsIRDFService.h" #include "nsRDFCID.h" -#if defined(DEBUG_alecf) || defined(DEBUG_sspitzer_) || defined(DEBUG_seth_) +#if defined(DEBUG_alecf) || defined(DEBUG_sspitzer) || defined(DEBUG_seth) #define DEBUG_ACCOUNTMANAGER 1 #endif @@ -365,6 +365,9 @@ nsMsgAccountManager::CreateIncomingServer(const char* username, NS_ENSURE_ARG_POINTER(_retval); nsresult rv; + rv = LoadAccounts(); + if (NS_FAILED(rv)) return rv; + nsCAutoString key; getUniqueKey(SERVER_PREFIX, &m_incomingServers, key); rv = createKeyedServer(key, username, hostname, type, _retval); @@ -451,7 +454,7 @@ nsMsgAccountManager::createKeyedServer(const char* key, serverContractID += type; // finally, create the server -#ifdef DEBUG_sspitzer_ +#ifdef DEBUG_ACCOUNTMANAGER printf("serverContractID = %s\n", (const char *)serverContractID); #endif rv = nsComponentManager::CreateInstance(serverContractID, @@ -1138,6 +1141,9 @@ nsMsgAccountManager::LoadAccounts() str.StripWhitespace(); if (!str.IsEmpty()) { +#ifdef DEBUG_ACCOUNTMANAGER + printf("account = %s\n",(const char *)str.GetBuffer()); +#endif rv = GetAccount(str.GetBuffer(), getter_AddRefs(account)); }