From 70b257c35e4482f16c2e7fb01305cbd733efc9ec Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Fri, 25 Aug 2000 04:43:48 +0000 Subject: [PATCH] bug #48546. SocketTransport now obeys the LOAD_BACKGROUND flag and will not call the nsIProgressEventSink. --- netwerk/base/src/nsSocketTransport.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/netwerk/base/src/nsSocketTransport.cpp b/netwerk/base/src/nsSocketTransport.cpp index 1d07d47a45ea..a25ab22ebf2b 100644 --- a/netwerk/base/src/nsSocketTransport.cpp +++ b/netwerk/base/src/nsSocketTransport.cpp @@ -656,7 +656,10 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags) break; } - fireStatus(mCurrentState); + // Notify the nsIProgressEventSink of the progress... + if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes)) { + fireStatus(mCurrentState); + } // // If the current state has successfully completed, then move to the // next state for the current operation... @@ -1189,7 +1192,8 @@ nsresult nsSocketTransport::doRead(PRInt16 aSelectFlags) ("--- Leaving nsSocketTransport::doRead() [%s:%d %x]. rv = %x.\t" "Total bytes read: %d\n\n", mHostName, mPort, this, rv, totalBytesWritten)); - if (mEventSink) + + if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink) // we don't have content length info at the socket level // just pass 0 through. (void)mEventSink->OnProgress(this, mReadContext, mReadOffset, 0); @@ -1284,7 +1288,7 @@ nsresult nsSocketTransport::doWrite(PRInt16 aSelectFlags) "Total bytes written: %d\n\n", mHostName, mPort, this, rv, totalBytesWritten)); - if (mEventSink) + if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink) // we don't have content length info at the socket level // just pass 0 through. (void)mEventSink->OnProgress(this, mWriteContext, mWriteOffset, 0);