Getting base building again. Fixed the changes from nsIOutputStream's Write function.

This commit is contained in:
gagan%netscape.com 1999-06-04 07:25:16 +00:00
parent 447f253fdb
commit 5052bb91df
2 changed files with 7 additions and 2 deletions

View File

@ -269,7 +269,12 @@ nsFileTransport::Process(void)
if (NS_FAILED(mStatus)) goto error;
PRUint32 amt;
mStatus = mBuffer->Write(NS_STATIC_CAST(nsIInputStream*, mFileStream), &amt);
PRUint32 len;
mBufferStream->GetLength(&len);
mStatus = mBuffer->WriteFrom(
NS_STATIC_CAST(nsIInputStream*, mFileStream),
len,
&amt);
if (mStatus == NS_BASE_STREAM_EOF) goto error;
if (NS_FAILED(mStatus)) goto error;

View File

@ -105,7 +105,7 @@ nsSyncStreamListener::OnDataAvailable(nsISupports* context,
PRUint32 amt;
PRInt32 count = (PRInt32)aLength;
while (count > 0) { // this should only go around once since the output stream is blocking
rv = mOutputStream->Write(aIStream, &amt);
rv = mOutputStream->WriteFrom(aIStream, count, &amt);
if (NS_FAILED(rv)) return rv;
count -= amt;
}