108276. Open the mailbox in PR_RDONLY mode because only read operations are done using

this connection. should cut down closing mailbox (PR_Close()) time.


git-svn-id: svn://10.0.0.236/trunk@107429 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
naving%netscape.com 2001-11-06 04:25:28 +00:00
parent 6ad05b9ea5
commit 77196885e6
2 changed files with 3 additions and 3 deletions

View File

@ -189,8 +189,8 @@ nsresult nsMsgProtocol::OpenFileSocket(nsIURI * aURL, PRUint32 aStartPosition, P
nsCOMPtr<nsIFileTransportService> fts =
do_GetService(kFileTransportServiceCID, &rv);
if (NS_FAILED(rv)) return rv;
rv = fts->CreateTransport(file, PR_RDWR | PR_CREATE_FILE,
//we are always using this file socket to read data from the mailbox.
rv = fts->CreateTransport(file, PR_RDONLY,
0664, getter_AddRefs(m_transport));
m_socketIsOpen = PR_FALSE;

View File

@ -151,7 +151,7 @@ nsresult nsMailboxProtocol::OpenFileSocketForReuse(nsIURI * aURL, PRUint32 aStar
m_multipleMsgMoveCopyStream = do_QueryInterface(fileStream, &rv);
NS_ENSURE_SUCCESS(rv, rv);
fileStream->Init(file, PR_RDWR | PR_CREATE_FILE, 0664);
fileStream->Init(file, PR_RDONLY, 0664); //just have to read the messages
PRUint32 length;
PRInt64 fileSize;
rv = file->GetFileSize( &fileSize);