aboutsummaryrefslogtreecommitdiff
path: root/www/mozilla-vendor
diff options
context:
space:
mode:
authorMunechika SUMIKAWA <sumikawa@FreeBSD.org>2002-03-29 07:03:57 +0000
committerMunechika SUMIKAWA <sumikawa@FreeBSD.org>2002-03-29 07:03:57 +0000
commitc6f11a555225ed9c0aa1915a4dc1f5ab8a92f2be (patch)
tree0c566c542328897a27dbab1b75f32eebecde3b4a /www/mozilla-vendor
parente6e5107b4aed52b3168186882969057e3480519a (diff)
downloadports-c6f11a555225ed9c0aa1915a4dc1f5ab8a92f2be.tar.gz
ports-c6f11a555225ed9c0aa1915a4dc1f5ab8a92f2be.zip
Notes
Diffstat (limited to 'www/mozilla-vendor')
-rw-r--r--www/mozilla-vendor/Makefile2
-rw-r--r--www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.cpp80
-rw-r--r--www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.h20
3 files changed, 101 insertions, 1 deletions
diff --git a/www/mozilla-vendor/Makefile b/www/mozilla-vendor/Makefile
index 0d5c55d9acd0..c8b1ac83feb1 100644
--- a/www/mozilla-vendor/Makefile
+++ b/www/mozilla-vendor/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mozilla
PORTVERSION= 0.9.9
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA} \
diff --git a/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.cpp b/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.cpp
new file mode 100644
index 000000000000..cb0b3638555f
--- /dev/null
+++ b/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.cpp
@@ -0,0 +1,80 @@
+--- netwerk/base/src/nsSocketTransport.cpp.orig Thu Feb 7 11:26:46 2002
++++ netwerk/base/src/nsSocketTransport.cpp Thu Mar 21 12:24:23 2002
+@@ -513,21 +513,8 @@
+
+ // on connection failure, reuse next address if one exists
+ if (mStatus == NS_ERROR_CONNECTION_REFUSED) {
+- mNetAddress = mNetAddrList.GetNext(mNetAddress);
+- if (mNetAddress) {
+-#if defined(PR_LOGGING)
+- char buf[50];
+- PR_NetAddrToString(mNetAddress, buf, sizeof(buf));
+- LOG(("connection failed... trying %s\n", buf));
+-#endif
+- PR_Close(mSocketFD);
+- mSocketFD = nsnull;
+-
+- // mask error status so we'll return to this state
+- mStatus = NS_OK;
+-
+- // need to re-enter Process() asynchronously
+- mService->AddToWorkQ(this);
++ LOG(("connection failed [this=%x error=%x]\n", this, mStatus));
++ if (TryNextAddress()) {
+ done = PR_TRUE;
+ continue;
+ }
+@@ -545,6 +532,23 @@
+ LOG(("nsSocketTransport: Transport [host=%s:%d this=%x] is in Timeout state.\n",
+ mHostName, mPort, this));
+ mStatus = NS_ERROR_NET_TIMEOUT;
++
++ // on timeout, reuse next address if one exists ... do this only
++ // if we haven't already fired OnStartRequest.
++ if (mReadRequest || mWriteRequest) {
++ PRBool firedOnStart = PR_TRUE; // initial value doesn't matter
++ if (mReadRequest)
++ firedOnStart = mReadRequest->IsInitialized();
++ if (!firedOnStart && mWriteRequest)
++ firedOnStart = mWriteRequest->IsInitialized();
++ if (!firedOnStart && TryNextAddress()) {
++ // a little bit of hackery here so we'll end up in the
++ // WaitConnect state...
++ mCurrentState = eSocketState_WaitConnect;
++ done = PR_TRUE;
++ continue;
++ }
++ }
+ break;
+
+ default:
+@@ -591,6 +595,29 @@
+ if (mWriteRequest)
+ mWriteRequest->Cancel(status);
+ return NS_OK;
++}
++
++PRBool
++nsSocketTransport::TryNextAddress()
++{
++ mNetAddress = mNetAddrList.GetNext(mNetAddress);
++ if (mNetAddress) {
++#if defined(PR_LOGGING)
++ char buf[64];
++ PR_NetAddrToString(mNetAddress, buf, sizeof(buf));
++ LOG((" ...trying next address: %s\n", buf));
++#endif
++ PR_Close(mSocketFD);
++ mSocketFD = nsnull;
++
++ // mask error status so we'll return to this state
++ mStatus = NS_OK;
++
++ // need to re-enter Process() asynchronously
++ mService->AddToWorkQ(this);
++ return PR_TRUE;
++ }
++ return PR_FALSE;
+ }
+
+ void
diff --git a/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.h b/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.h
new file mode 100644
index 000000000000..d86e5ebc814a
--- /dev/null
+++ b/www/mozilla-vendor/files/patch-netwerk::base::src::nsSocketTransport.h
@@ -0,0 +1,20 @@
+--- netwerk/base/src/nsSocketTransport.h.orig Sat Feb 2 11:45:25 2002
++++ netwerk/base/src/nsSocketTransport.h Thu Mar 21 12:24:26 2002
+@@ -208,6 +208,8 @@
+ nsresult doReadWrite(PRInt16 aSelectFlags);
+ nsresult doResolveHost();
+
++ PRBool TryNextAddress();
++
+ void CompleteAsyncRead();
+ void CompleteAsyncWrite();
+
+@@ -378,7 +380,7 @@
+
+ void SetSocket(PRFileDesc *aSock) { mSock = aSock; }
+ PRUint32 GetOffset() { return mOffset; }
+- void SetOffset(PRUint32 o) { mOffset = o; }
++ void SetOffset(PRUint32 offset) { mOffset = offset; }
+ PRBool GotWouldBlock() { return mError == PR_WOULD_BLOCK_ERROR; }
+ PRBool GotError() { return mError != 0; }
+ PRErrorCode GetError() { return mError; }