Fixed 'connected' check.

This commit is contained in:
Philip Homburg 2005-08-25 10:47:24 +00:00
parent 915e38066a
commit 4c863cf9fc

View 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;