BugZilla: 43337. Better implementation
authorlarryh%netscape.com
Wed, 28 Jun 2000 22:32:47 +0000
changeset 1449 2ed42fd0b705547bc0305a827ce8dbb2a3f6d368
parent 1448 5d977520c03ae1d0565397047a88553c56cb100f
child 1454 2398c210529b85ea191d55cf5cc4750f2bfa1370
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
@@ -2060,18 +2060,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);