]> Zhao Yanbai Git Server - minix.git/commitdiff
Fixed 'connected' check.
authorPhilip Homburg <philip@cs.vu.nl>
Thu, 25 Aug 2005 10:47:24 +0000 (10:47 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Thu, 25 Aug 2005 10:47:24 +0000 (10:47 +0000)
lib/ip/getpeername.c

index 3d5d826d0b37f127c2fdcea0a7e9e748e843bbd7..39804ff4121a9bb285a6611d98fce57173edcf51 100644 (file)
@@ -47,8 +47,8 @@ static int _tcp_getpeername(int socket, struct sockaddr *_RESTRICT address,
        socklen_t len;
        struct sockaddr_in sin;
 
-       if (((tcpconfp->nwtc_flags & NWTC_REMADDR_MASK) != NWTC_SET_RA) ||
-               ((tcpconfp->nwtc_flags & NWTC_REMPORT_MASK) != NWTC_SET_RP))
+       if (tcpconfp->nwtc_remaddr == 0 ||
+               tcpconfp->nwtc_remport == 0)
        {
                errno= ENOTCONN;
                return -1;