You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/07/21 15:42:33 UTC
[GitHub] [incubator-nuttx] GUIDINGLI opened a new pull request, #6670: local socket related update
GUIDINGLI opened a new pull request, #6670:
URL: https://github.com/apache/incubator-nuttx/pull/6670
## Summary
local: connect operation should jump self's connection
local: server accept should wait client connect done
server:
at accept last nxsem_post(&client->lc_waitsem);
client:
connect wait(&client->lc_waitsem) then local_open_client_rx();
But if the server priority is higher then client,
and after server accept return, immediately call send().
At this time the client has no way do local_open_client_rx().
Then server send() return error.
Fix:
add lc_done sem to client
## Impact
local socket
## Testing
VELA
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6670: local socket related update
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6670:
URL: https://github.com/apache/incubator-nuttx/pull/6670#discussion_r926942310
##########
net/local/local_sendpacket.c:
##########
@@ -86,13 +86,20 @@ static int local_fifo_write(FAR struct file *filep, FAR const uint8_t *buf,
ret = file_write(filep, buf + nwritten, len - nwritten);
if (ret < 0)
{
- if (ret != -EINTR)
+ if (ret == -EINTR)
+ {
+ continue;
+ }
+ else if (ret == -EAGAIN)
+ {
+ break;
+ }
+ else
{
nerr("ERROR: file_write failed: %zd\n", ret);
break;
}
Review Comment:
```suggestion
```
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6670: local socket related update
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6670:
URL: https://github.com/apache/incubator-nuttx/pull/6670#discussion_r926941500
##########
net/local/local_recvutils.c:
##########
@@ -78,14 +78,22 @@ int local_fifo_read(FAR struct file *filep, FAR uint8_t *buf,
nread = file_read(filep, buf, remaining);
if (nread < 0)
{
- if (nread != -EINTR)
+ ret = (int)nread;
+
+ if (nread == -EINTR)
Review Comment:
Let's use ret here and below instead of nread
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] pkarashchenko merged pull request #6670: local socket related update
Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6670:
URL: https://github.com/apache/incubator-nuttx/pull/6670
--
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org