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:
parent
324446bbba
commit
46a8c665d7
|
@ -288,6 +288,7 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
|||
sndlen, tcpip_hdrsize(conn));
|
||||
if (ret <= 0)
|
||||
{
|
||||
pstate->snd_sent = ret;
|
||||
goto end_wait;
|
||||
}
|
||||
|
||||
|
@ -374,6 +375,7 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
|
|||
sndlen, tcpip_hdrsize(conn));
|
||||
if (ret <= 0)
|
||||
{
|
||||
pstate->snd_sent = ret;
|
||||
goto end_wait;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue