aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--www/mozilla-devel/Makefile2
-rw-r--r--www/mozilla-devel/files/patch-netwerk::base::src::nsSocketTransport.cpp80
-rw-r--r--www/mozilla-devel/files/patch-netwerk::base::src::nsSocketTransport.h20
-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
-rw-r--r--www/mozilla/Makefile2
-rw-r--r--www/mozilla/files/patch-netwerk::base::src::nsSocketTransport.cpp80
-rw-r--r--www/mozilla/files/patch-netwerk::base::src::nsSocketTransport.h20
-rw-r--r--www/seamonkey/Makefile2
-rw-r--r--www/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.cpp80
-rw-r--r--www/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.h20
-rw-r--r--www/seamonkey2/Makefile2
-rw-r--r--www/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.cpp80
-rw-r--r--www/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.h20
15 files changed, 505 insertions, 5 deletions
diff --git a/www/mozilla-devel/Makefile b/www/mozilla-devel/Makefile
index 0d5c55d9acd0..c8b1ac83feb1 100644
--- a/www/mozilla-devel/Makefile
+++ b/www/mozilla-devel/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-devel/files/patch-netwerk::base::src::nsSocketTransport.cpp b/www/mozilla-devel/files/patch-netwerk::base::src::nsSocketTransport.cpp
new file mode 100644
index 000000000000..cb0b3638555f
--- /dev/null
+++ b/www/mozilla-devel/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-devel/files/patch-netwerk::base::src::nsSocketTransport.h b/www/mozilla-devel/files/patch-netwerk::base::src::nsSocketTransport.h
new file mode 100644
index 000000000000..d86e5ebc814a
--- /dev/null
+++ b/www/mozilla-devel/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; }
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; }
diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile
index 0d5c55d9acd0..c8b1ac83feb1 100644
--- a/www/mozilla/Makefile
+++ b/www/mozilla/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/files/patch-netwerk::base::src::nsSocketTransport.cpp b/www/mozilla/files/patch-netwerk::base::src::nsSocketTransport.cpp
new file mode 100644
index 000000000000..cb0b3638555f
--- /dev/null
+++ b/www/mozilla/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/files/patch-netwerk::base::src::nsSocketTransport.h b/www/mozilla/files/patch-netwerk::base::src::nsSocketTransport.h
new file mode 100644
index 000000000000..d86e5ebc814a
--- /dev/null
+++ b/www/mozilla/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; }
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile
index 0d5c55d9acd0..c8b1ac83feb1 100644
--- a/www/seamonkey/Makefile
+++ b/www/seamonkey/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/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.cpp b/www/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.cpp
new file mode 100644
index 000000000000..cb0b3638555f
--- /dev/null
+++ b/www/seamonkey/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/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.h b/www/seamonkey/files/patch-netwerk::base::src::nsSocketTransport.h
new file mode 100644
index 000000000000..d86e5ebc814a
--- /dev/null
+++ b/www/seamonkey/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; }
diff --git a/www/seamonkey2/Makefile b/www/seamonkey2/Makefile
index 0d5c55d9acd0..c8b1ac83feb1 100644
--- a/www/seamonkey2/Makefile
+++ b/www/seamonkey2/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/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.cpp b/www/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.cpp
new file mode 100644
index 000000000000..cb0b3638555f
--- /dev/null
+++ b/www/seamonkey2/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/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.h b/www/seamonkey2/files/patch-netwerk::base::src::nsSocketTransport.h
new file mode 100644
index 000000000000..d86e5ebc814a
--- /dev/null
+++ b/www/seamonkey2/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; }