BugZilla: 43337. Better implementation NSPRPUB_RELEASE_4_0_BRANCH
authorlarryh%netscape.com
Wed, 28 Jun 2000 22:34:00 +0000
branchNSPRPUB_RELEASE_4_0_BRANCH
changeset 1450 3cbe94bb3c710b9f55eacbcbf8ca1ae9cde2d36d
parent 1447 6d4ac1e848fcc6402367e96cd5d908ef3a91565f
child 1453 72cc360f8383b3beb9ba04dd264bf00af99b2ddf
push idunknown
push userunknown
push dateunknown
bugs43337
BugZilla: 43337. Better implementation
pr/src/md/windows/ntio.c
--- a/pr/src/md/windows/ntio.c
+++ b/pr/src/md/windows/ntio.c
@@ -2039,18 +2039,18 @@ PRStatus
                         SO_CONNECT_TIME,
                         (char *) &seconds,
                         (PINT) &bytes);
         if (rv == NO_ERROR) {
             if (seconds == 0xffffffff) {
                 PR_SetError(PR_NOT_CONNECTED_ERROR, 0);
                 return PR_FAILURE;
             }
+            *len = PR_NETADDR_SIZE(&fd->secret->md.peer_addr);
             memcpy(addr, &fd->secret->md.peer_addr, *len);
-            *len = PR_NETADDR_SIZE(addr);
             return PR_SUCCESS;
         } else {
             _PR_MD_MAP_GETSOCKOPT_ERROR(WSAGetLastError());
             return PR_FAILURE;
         }
     } else { 
         rv = getpeername((SOCKET)fd->secret->md.osfd,
                          (struct sockaddr *) addr, len);