netdb: Don't call _NX_RECV and _NX_SEND

since netdb should only be called from userspace

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2021-02-16 00:12:01 +08:00 committed by Abdelatif Guettouche
parent 092d23b25d
commit f3043d133e

View File

@ -301,10 +301,10 @@ static int dns_send_query(int sd, FAR const char *name,
return ret;
}
ret = _NX_SEND(sd, buffer, dest - buffer, 0);
ret = send(sd, buffer, dest - buffer, 0);
if (ret < 0)
{
ret = -_NX_GETERRNO(ret);
ret = -errno;
nerr("ERROR: sendto failed: %d\n", ret);
return ret;
}
@ -346,10 +346,10 @@ static int dns_recv_response(int sd, FAR union dns_addr_u *addr, int naddr,
/* Receive the response */
ret = _NX_RECV(sd, buffer, RECV_BUFFER_SIZE, 0);
ret = recv(sd, buffer, RECV_BUFFER_SIZE, 0);
if (ret < 0)
{
ret = -_NX_GETERRNO(ret);
ret = -errno;
nerr("ERROR: recv failed: %d\n", ret);
return ret;
}