From: Philip Homburg Date: Thu, 25 Aug 2005 10:47:24 +0000 (+0000) Subject: Fixed 'connected' check. X-Git-Tag: v3.1.0~285 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=4c863cf9fc45eb2c5b96abe84372ed27cdb3e1c8;p=minix.git Fixed 'connected' check. --- diff --git a/lib/ip/getpeername.c b/lib/ip/getpeername.c index 3d5d826d0..39804ff41 100644 --- a/lib/ip/getpeername.c +++ b/lib/ip/getpeername.c @@ -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;