Discussion:
[nuttx] Patch for errno handling in tcp_send_unbuffered
Pelle Windestam Pelle.Windestam@tagmaster.com [nuttx]
2018-02-13 10:56:47 UTC
Permalink
Hi,

I noticed an error in the tcp_send_unbuffered() function. It is supposed to return a negated errno code which will be set properly by upper level logic in write(), but it sets errno itself and returns -1 which leads to errno information being lost (in my case not being able to determine when write() is interrupted by a signal). I'm attaching a patch which fixes this.

//Pelle
spudarnia@yahoo.com [nuttx]
2018-02-13 14:03:48 UTC
Permalink
Good find. Thanks!


I committed the same change for tcp_send_buffered.c which was also returning -1 and errno set vs a negated errno value.


Greg

Loading...