bug 222037 beos only - HTTPS doesn't work under BONE netstack in 1.5* trunk MOZILLA_1_6_BRANCH MOZILLA_1_6_RELEASE
authorcbiesinger%web.de
Wed, 07 Jan 2004 00:06:26 +0000
branchMOZILLA_1_6_BRANCH
changeset 3004 2d9e4eb10101ca4f0fad3ae61bad52185f73ba96
parent 2998 078ca2ef4069c7d47806fec1d6a25758c1a53113
push idunknown
push userunknown
push dateunknown
bugs222037
bug 222037 beos only - HTTPS doesn't work under BONE netstack in 1.5* trunk patch by Fredrik Holmqvist (thesuckiestemail@yahoo.se) r=sergei_d@fi.tartu.ee sr=darin
pr/src/md/beos/bnet.c
--- a/pr/src/md/beos/bnet.c
+++ b/pr/src/md/beos/bnet.c
@@ -739,16 +739,25 @@ PRStatus
 PRStatus
 _MD_getpeername (PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen)
 {
     PRInt32 rv, err;
 
     rv = getpeername(fd->secret->md.osfd,
                      (struct sockaddr *) addr, (_PRSockLen_t *)addrlen);
 
+#ifdef _PR_HAVE_SOCKADDR_LEN
+    if (rv == 0) {
+        /* ignore the sa_len field of struct sockaddr */
+        if (addr) {
+            addr->raw.family = ((struct sockaddr *) addr)->sa_family;
+        }
+    }
+#endif /* _PR_HAVE_SOCKADDR_LEN */
+
     if (rv < 0) {
         err = _MD_ERRNO();
         _PR_MD_MAP_GETPEERNAME_ERROR(err);
     }
     return rv==0?PR_SUCCESS:PR_FAILURE;
 }
 
 PRStatus