summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authortaya <taya@pkgsrc.org>2001-07-13 16:14:23 +0000
committertaya <taya@pkgsrc.org>2001-07-13 16:14:23 +0000
commit489dce9875024cad93f68287683fc8063ce789ed (patch)
treea001f911a9ec0bddeac9fe7ff14b9d33bb9ba120 /www
parentdb2fe9636b156e0917a38f6c3382cefbf0a6892c (diff)
downloadpkgsrc-489dce9875024cad93f68287683fc8063ce789ed.tar.gz
Update mozilla to 0.9.2nb1.
Try to connect to all address if host have more than 1 address.
Diffstat (limited to 'www')
-rw-r--r--www/mozilla/Makefile5
-rw-r--r--www/mozilla/distinfo4
-rw-r--r--www/mozilla/patches/patch-ax232
-rw-r--r--www/mozilla/patches/patch-ay30
4 files changed, 268 insertions, 3 deletions
diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile
index a2efa9414cc..48846122e79 100644
--- a/www/mozilla/Makefile
+++ b/www/mozilla/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.69 2001/07/01 13:05:07 taya Exp $
+# $NetBSD: Makefile,v 1.70 2001/07/13 16:14:23 taya Exp $
MOZ_VER= 0.9.2
+NB_VER= nb1
DISTNAME= mozilla-source-${MOZ_VER}
-PKGNAME= mozilla-${MOZ_VER}
+PKGNAME= mozilla-${MOZ_VER}${NB_VER}
WRKSRC= ${WRKDIR}/mozilla
CATEGORIES= www
MASTER_SITES= ftp://ftp.mozilla.org/pub/mozilla/releases/mozilla${MOZ_VER}/src/ \
diff --git a/www/mozilla/distinfo b/www/mozilla/distinfo
index f2d637bbc2c..45e0d57b317 100644
--- a/www/mozilla/distinfo
+++ b/www/mozilla/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.5 2001/07/01 13:05:07 taya Exp $
+$NetBSD: distinfo,v 1.6 2001/07/13 16:14:23 taya Exp $
SHA1 (mozilla-source-0.9.2.tar.bz2) = bf6299da8953a827cb73ce41a9e76daea329dd97
Size (mozilla-source-0.9.2.tar.bz2) = 25377259 bytes
SHA1 (patch-aq) = e7b9c4da12af1d9d7b22f5bd9926b56602f981ff
SHA1 (patch-au) = 03c06f922e2ded678de24fea6922e270e8cd39c6
SHA1 (patch-aw) = 66edf538f97cca3310646428c3282ec3d609aa5f
+SHA1 (patch-ax) = e0b099d9786ef0956280c9d9b9deea0a200fe08e
+SHA1 (patch-ay) = 7af5cb21cbaf7dadbeddb7018821ef44c9b32fbc
diff --git a/www/mozilla/patches/patch-ax b/www/mozilla/patches/patch-ax
new file mode 100644
index 00000000000..595fdf24927
--- /dev/null
+++ b/www/mozilla/patches/patch-ax
@@ -0,0 +1,232 @@
+$NetBSD: patch-ax,v 1.1 2001/07/13 16:14:23 taya Exp $
+
+diff -ru ../Orig/mozilla/netwerk/base/src/nsSocketTransport.cpp ./netwerk/base/src/nsSocketTransport.cpp
+--- ../Orig/mozilla/netwerk/base/src/nsSocketTransport.cpp Tue Jun 19 06:26:16 2001
++++ ./netwerk/base/src/nsSocketTransport.cpp Tue Jul 10 01:14:42 2001
+@@ -170,8 +170,12 @@
+ //
+ // Set up Internet defaults...
+ //
++#if 0
+ memset(&mNetAddress, 0, sizeof(mNetAddress));
+ PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, 0, &mNetAddress);
++#else
++ mNetAddressList = NULL;
++#endif
+
+ //
+ // Initialize the global connect timeout value if necessary...
+@@ -220,6 +224,13 @@
+ nsAutoMonitor::DestroyMonitor(mMonitor);
+ mMonitor = nsnull;
+ }
++
++ PRNetAddrList *p, *next;;
++ for(p = mNetAddressList; p; ){
++ next = p->next;
++ delete p;
++ p = next;
++ }
+ }
+
+
+@@ -603,14 +614,20 @@
+ //
+ // The hostname has not been resolved yet...
+ //
++#if 0
+ if (PR_IsNetAddrType(&mNetAddress, PR_IpAddrAny)) {
++#else
++ if (mNetAddressList == NULL) {
++#endif
+ //
+ // Initialize the port used for the connection...
+ //
+ // XXX: The list of ports must be restricted - see net_bad_ports_table[] in
+ // mozilla/network/main/mkconect.c
+ //
++#if 0
+ mNetAddress.ipv6.port = PR_htons(((mProxyPort != -1 && !mProxyTransparent) ? mProxyPort : mPort));
++#endif
+
+ NS_WITH_SERVICE(nsIDNSService,
+ pDNSService,
+@@ -637,7 +654,11 @@
+ //
+ // The DNS lookup has finished... It has either failed or succeeded.
+ //
++#if 0
+ if (NS_FAILED(mStatus) || !PR_IsNetAddrType(&mNetAddress, PR_IpAddrAny)) {
++#else
++ if (NS_FAILED(mStatus) || mNetAddressList != NULL) {
++#endif
+ mDNSRequest = 0;
+ rv = mStatus;
+ }
+@@ -798,7 +819,12 @@
+ // This is only done the first time doConnection(...) is called.
+ //
+ if (NS_SUCCEEDED(rv)) {
++#if 0
+ status = PR_Connect(mSocketFD, &mNetAddress, gConnectTimeout);
++#else
++try_again:
++ status = PR_Connect(mSocketFD, &(mNetAddressp->mNetAddress), gConnectTimeout);
++#endif
+ if (PR_SUCCESS != status) {
+ PRErrorCode code = PR_GetError();
+ //
+@@ -823,6 +849,9 @@
+ //
+ else {
+ // Connection refused...
++ if((mNetAddressp = mNetAddressp->next)){
++ goto try_again;
++ }
+ LOG(("nsSocketTransport: Connection Refused [%s:%d %x]. PRErrorCode = %x\n",
+ mHostName, mPort, this, code));
+ rv = NS_ERROR_CONNECTION_REFUSED;
+@@ -836,11 +865,17 @@
+ //
+ else if (aSelectFlags) {
+ if (PR_POLL_EXCEPT & aSelectFlags) {
++ if((mNetAddressp = mNetAddressp->next)){
++ goto try_again;
++ }
+ LOG(("nsSocketTransport: Connection Refused via PR_POLL_EXCEPT. [%s:%d %x].\n",
+ mHostName, mPort, this));
+ rv = NS_ERROR_CONNECTION_REFUSED;
+ }
+ else if (PR_POLL_HUP & aSelectFlags) {
++ if((mNetAddressp = mNetAddressp->next)){
++ goto try_again;
++ }
+ LOG(("nsSocketTransport: Connection Refused via PR_POLL_HUP. [%s:%d %x].\n",
+ mHostName, mPort, this));
+ rv = NS_ERROR_CONNECTION_REFUSED;
+@@ -883,7 +918,11 @@
+ //
+ // The hostname has not been resolved yet...
+ //
++#if 0
+ if (PR_IsNetAddrType(&mNetAddress, PR_IpAddrAny)) {
++#else
++ if (mNetAddressList == NULL) {
++#endif
+ NS_WITH_SERVICE(nsIDNSService,
+ pDNSService,
+ kDNSService,
+@@ -905,6 +944,7 @@
+ return NS_ERROR_FAILURE;
+ }
+
++#if 0
+ if (addr.raw.family == PR_AF_INET)
+ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &mNetAddress.ipv6.ip);
+ else
+@@ -915,6 +955,21 @@
+
+ LOG(("address { family=%hu, port=%hu }\n",
+ mNetAddress.ipv6.family, PR_ntohs(mNetAddress.ipv6.port)));
++#else
++/****************/
++ mNetAddressList = new PRNetAddrList;
++ mNetAddressList->next = NULL;
++ if (addr.raw.family == PR_AF_INET)
++ PR_ConvertIPv4AddrToIPv6(addr.inet.ip, &(mNetAddressList->mNetAddress.ipv6.ip));
++ else
++ memcpy(&(mNetAddressList->mNetAddress.ipv6.ip), &addr.ipv6.ip, sizeof(mNetAddressList->mNetAddress.ipv6.ip));
++
++ mNetAddressList->mNetAddress.ipv6.port
++ = PR_htons(((mProxyPort != -1 && !mProxyTransparent) ? mProxyPort : mPort));
++
++ LOG(("address { family=%hu, port=%hu }\n",
++ mNetAddressList->mNetAddress.ipv6.family, PR_ntohs(mNetAddressList->mNetAddress.ipv6.port)));
++#endif
+ }
+
+ //
+@@ -1346,6 +1401,7 @@
+ return NS_OK;
+ }
+
++#if 0
+ NS_IMETHODIMP
+ nsSocketTransport::OnFound(nsISupports *aContext,
+ const char* aHostName,
+@@ -1382,6 +1438,51 @@
+
+ return rv;
+ }
++#else
++NS_IMETHODIMP
++nsSocketTransport::OnFound(nsISupports *aContext,
++ const char* aHostName,
++ nsHostEnt *aHostEnt)
++{
++ // Enter the socket transport lock...
++ nsAutoMonitor mon(mMonitor);
++ nsresult rv = NS_OK;
++ char **p;
++ PRNetAddrList **addrp = &mNetAddressList;
++
++ if (aHostEnt->hostEnt.h_addr_list && aHostEnt->hostEnt.h_addr_list[0]) {
++ for(p = aHostEnt->hostEnt.h_addr_list; *p; p++){
++ *addrp = new PRNetAddrList;
++ (*addrp)->next = NULL;
++ (*addrp)->mNetAddress.ipv6.port = PR_htons(((mProxyPort != -1 && !mProxyTransparent) ? mProxyPort : mPort));
++ (*addrp)->mNetAddress.raw.family = PR_AF_INET6;
++ memcpy(&((*addrp)->mNetAddress.ipv6.ip), *p, sizeof((*addrp)->mNetAddress.ipv6.ip));
++#if defined(PR_LOGGING)
++ char addrbuf[50];
++ PR_NetAddrToString(&((*addrp)->mNetAddress), addrbuf, sizeof(addrbuf));
++ LOG(("nsSocketTransport: OnFound(...) [%s:%d %x]."
++ " DNS lookup succeeded => %s (%s)\n",
++ mHostName, mPort, this,
++ aHostEnt->hostEnt.h_name,
++ addrbuf));
++#endif
++ addrp = &((*addrp)->next);
++ }
++ mNetAddressp = mNetAddressList;
++ } else {
++ // XXX: What should happen here? The GetHostByName(...) succeeded but
++ // there are *no* A records...
++ rv = NS_ERROR_FAILURE;
++
++ LOG(("nsSocketTransport: OnFound(...) [%s:%d %x]."
++ " DNS lookup succeeded (%s) but no address returned!",
++ mHostName, mPort, this,
++ aHostEnt->hostEnt.h_name));
++ }
++
++ return rv;
++}
++#endif
+
+ NS_IMETHODIMP
+ nsSocketTransport::OnStopLookup(nsISupports *aContext,
+@@ -1401,7 +1502,11 @@
+ // If the lookup failed, set the status...
+ if (NS_FAILED(aStatus))
+ mStatus = aStatus;
++#if 0
+ else if (PR_IsNetAddrType(&mNetAddress, PR_IpAddrAny))
++#else
++ else if (mNetAddressList == NULL)
++#endif
+ mStatus = NS_ERROR_ABORT;
+
+ // Start processing the transport again - if necessary...
+@@ -1728,7 +1833,11 @@
+ *_retval = (char*)nsMemory::Alloc(aLen);
+ if (!*_retval) return NS_ERROR_FAILURE;
+
++#if 0
+ PRStatus status = PR_NetAddrToString(&mNetAddress, *_retval, aLen);
++#else
++ PRStatus status = PR_NetAddrToString(&mNetAddressList->mNetAddress, *_retval, aLen);
++#endif
+
+ if (PR_FAILURE == status) {
+ nsMemory::Free(*_retval);
diff --git a/www/mozilla/patches/patch-ay b/www/mozilla/patches/patch-ay
new file mode 100644
index 00000000000..306bfd9945a
--- /dev/null
+++ b/www/mozilla/patches/patch-ay
@@ -0,0 +1,30 @@
+$NetBSD: patch-ay,v 1.1 2001/07/13 16:14:24 taya Exp $
+
+diff -ru ../Orig/mozilla/netwerk/base/src/nsSocketTransport.h ./netwerk/base/src/nsSocketTransport.h
+--- ../Orig/mozilla/netwerk/base/src/nsSocketTransport.h Sat May 12 06:03:21 2001
++++ ./netwerk/base/src/nsSocketTransport.h Tue Jul 10 01:14:42 2001
+@@ -107,6 +107,11 @@
+ eSocketDNS_Wait = 0x2020
+ };
+
++typedef struct PRNetAddrList{
++ PRNetAddr mNetAddress;
++ struct PRNetAddrList *next;
++} PRNetAddrList;
++
+ //
+ // This is the default timeout value (in milliseconds) for sockets which have
+ // no activity...
+@@ -231,7 +236,12 @@
+ PRIntervalTime mLastActiveTime;
+ PRCList mListLink;
+ PRMonitor* mMonitor;
++#if 0
+ PRNetAddr mNetAddress;
++#else
++ PRNetAddrList *mNetAddressList;
++ PRNetAddrList *mNetAddressp;
++#endif
+ nsSocketOperation mOperation;
+ nsCOMPtr<nsISupports> mSecurityInfo;
+