mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +08:00
net/tcp: fix missing error code propagation
If devif_send() failed its returned error code was not propagated to user space. Instead, a send length of zero was returned (in violation of POSIX).
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
324446bbba
commit
46a8c665d7
@@ -288,6 +288,7 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
sndlen, tcpip_hdrsize(conn));
|
sndlen, tcpip_hdrsize(conn));
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
|
pstate->snd_sent = ret;
|
||||||
goto end_wait;
|
goto end_wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -374,6 +375,7 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
|||||||
sndlen, tcpip_hdrsize(conn));
|
sndlen, tcpip_hdrsize(conn));
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
{
|
{
|
||||||
|
pstate->snd_sent = ret;
|
||||||
goto end_wait;
|
goto end_wait;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user