BugZilla: 43337. Better implementation NSPRPUB_CLIENT_BRANCH
authorlarryh%netscape.com
Wed, 28 Jun 2000 22:36:25 +0000
branchNSPRPUB_CLIENT_BRANCH
changeset 1451 615e0e572e1f9061d5bb4c83b64f471bd11400b2
parent 1446 124ea8273b5238841d915c4d1a9ea1a1f814fd4e
child 1452 ace9608c51b5a9642990331e05784e6097f0ad76
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);