Adapt to the removed offset parameter in streams.

This commit is contained in:
mcmullen%netscape.com 1999-03-06 01:03:12 +00:00
Родитель b7c5b15590
Коммит 37cd469998
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -236,7 +236,7 @@ PRInt32 nsMailboxProtocol::ReadLine(nsIInputStream * inputStream, PRUint32 lengt
PRUint32 numBytesLastRead = 0; // total number of bytes read in the last cycle...
do
{
inputStream->Read(m_dataBuf, numBytesRead /* offset into m_dataBuf */, 1 /* read just one byte */, &numBytesLastRead);
inputStream->Read(m_dataBuf + numBytesRead /* offset into m_dataBuf */, 1 /* read just one byte */, &numBytesLastRead);
numBytesRead += numBytesLastRead;
} while (numBytesRead <= numBytesToRead && numBytesLastRead > 0 && m_dataBuf[numBytesRead-1] != '\n');
@ -269,7 +269,7 @@ PRInt32 nsMailboxProtocol::SendData(const char * dataBuffer)
NS_PRECONDITION(m_outputStream && m_outputConsumer, "no registered consumer for our output");
if (dataBuffer && m_outputStream)
{
nsresult rv = m_outputStream->Write(dataBuffer, 0 /* offset */, PL_strlen(dataBuffer), &writeCount);
nsresult rv = m_outputStream->Write(dataBuffer, PL_strlen(dataBuffer), &writeCount);
if (NS_SUCCEEDED(rv) && writeCount == PL_strlen(dataBuffer))
{
// notify the consumer that data has arrived