SPRESENSE opened a new issue, #7355:
URL: https://github.com/apache/incubator-nuttx/issues/7355
The usrsock can be run with various daemons and drivers, and it works fine
with NuttX11.0.0.
Since usrsock refactoring, it was not possible to return arbitrary POSIX
error codes, all errors from usrsock were only `-ECONNABORTED`.
For example, the usrsock ioctl should be changed as below? What do you think?
```diff
diff --git a/net/usrsock/usrsock_ioctl.c b/net/usrsock/usrsock_ioctl.c
index ba93ac5..4148ddb 100644
--- a/net/usrsock/usrsock_ioctl.c
+++ b/net/usrsock/usrsock_ioctl.c
@@ -55,7 +55,8 @@ static uint16_t ioctl_event(FAR struct net_driver_s *dev,
{
ninfo("socket aborted.\n");
- pstate->reqstate.result = -ECONNABORTED;
+ pstate->reqstate.result = (conn->resp.result < 0) ? conn->resp.result
+ : -ECONNABORTED;
pstate->valuelen = 0;
/* Stop further callbacks */
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]