Fixed 'connected' check.
This commit is contained in:
parent
915e38066a
commit
4c863cf9fc
@ -47,8 +47,8 @@ static int _tcp_getpeername(int socket, struct sockaddr *_RESTRICT address,
|
|||||||
socklen_t len;
|
socklen_t len;
|
||||||
struct sockaddr_in sin;
|
struct sockaddr_in sin;
|
||||||
|
|
||||||
if (((tcpconfp->nwtc_flags & NWTC_REMADDR_MASK) != NWTC_SET_RA) ||
|
if (tcpconfp->nwtc_remaddr == 0 ||
|
||||||
((tcpconfp->nwtc_flags & NWTC_REMPORT_MASK) != NWTC_SET_RP))
|
tcpconfp->nwtc_remport == 0)
|
||||||
{
|
{
|
||||||
errno= ENOTCONN;
|
errno= ENOTCONN;
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user