зеркало из https://github.com/mozilla/gecko-dev.git
ReadNextLine now returns # bytes read.
nsMsgLineStreamBuffer now takes a delimeter for end of line markings. This is CRLF for imap.
This commit is contained in:
Родитель
e30ed7eaa2
Коммит
82bf27d90c
|
@ -220,7 +220,7 @@ nsImapProtocol::nsImapProtocol() :
|
|||
m_allocatedSize = OUTPUT_BUFFER_SIZE;
|
||||
|
||||
// used to buffer incoming data by ReadNextLineFromInput
|
||||
m_inputStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, PR_TRUE /* allocate new lines */, PR_FALSE /* leave CRLFs on the returned string */);
|
||||
m_inputStreamBuffer = new nsMsgLineStreamBuffer(OUTPUT_BUFFER_SIZE, CRLF, PR_TRUE /* allocate new lines */, PR_FALSE /* leave CRLFs on the returned string */);
|
||||
m_currentBiffState = nsMsgBiffState_Unknown;
|
||||
|
||||
// where should we do this? Perhaps in the factory object?
|
||||
|
@ -450,8 +450,6 @@ void nsImapProtocol::SetupWithUrl(nsIURL * aURL)
|
|||
{
|
||||
NS_PRECONDITION(aURL, "null URL passed into Imap Protocol");
|
||||
|
||||
// m_flags = 0;
|
||||
|
||||
// query the URL for a nsIImapUrl
|
||||
m_runningUrl = nsnull; // initialize to NULL
|
||||
m_transport = nsnull;
|
||||
|
@ -3144,9 +3142,10 @@ char* nsImapProtocol::CreateNewLineFromSocket()
|
|||
{
|
||||
PRBool needMoreData = PR_FALSE;
|
||||
char * newLine = nsnull;
|
||||
PRUint32 numBytesInLine = 0;
|
||||
do
|
||||
{
|
||||
newLine = m_inputStreamBuffer->ReadNextLine(m_inputStream, needMoreData);
|
||||
newLine = m_inputStreamBuffer->ReadNextLine(m_inputStream, numBytesInLine, needMoreData);
|
||||
if (needMoreData)
|
||||
{
|
||||
// wait on the data available monitor!!
|
||||
|
|
Загрузка…
Ссылка в новой задаче