mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Getting base building again. Fixed the changes from nsIOutputStream's Write function.
This commit is contained in:
parent
447f253fdb
commit
5052bb91df
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user