You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "xiaoxiang781216 (via GitHub)" <gi...@apache.org> on 2024/03/06 17:57:33 UTC

[PR] Fix the minor issue found in net/local [nuttx]

xiaoxiang781216 opened a new pull request, #11856:
URL: https://github.com/apache/nuttx/pull/11856

   ## Summary
   
   - net/local: Fix minor issues found in code reading
   - net/local: Skip poll_notify in local_event_pollsetup if no event happen 
   - net/local: Fix the wrong direction of threshold setting 
   
   ## Impact
   
   local socket
   
   ## Testing
   
   internal test


-- 
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


Re: [PR] Fix the minor issue found in net/local [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis merged PR #11856:
URL: https://github.com/apache/nuttx/pull/11856


-- 
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


Re: [PR] Fix the minor issue found in net/local [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #11856:
URL: https://github.com/apache/nuttx/pull/11856#discussion_r1516284658


##########
net/local/local_accept.c:
##########
@@ -99,7 +98,7 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
                  FAR socklen_t *addrlen, FAR struct socket *newsock,
                  int flags)
 {
-  FAR struct local_conn_s *server;
+  FAR struct local_conn_s *server = psock->s_conn;

Review Comment:
   Of course, local_accept is called through psock->s_sockif.accept. It's impossible come to here if psock is NULL.



-- 
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


Re: [PR] Fix the minor issue found in net/local [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #11856:
URL: https://github.com/apache/nuttx/pull/11856#discussion_r1515372641


##########
net/local/local_accept.c:
##########
@@ -99,7 +98,7 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
                  FAR socklen_t *addrlen, FAR struct socket *newsock,
                  int flags)
 {
-  FAR struct local_conn_s *server;
+  FAR struct local_conn_s *server = psock->s_conn;

Review Comment:
   The origin code doesn't use assert, this patch just do the simple style change.



-- 
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


Re: [PR] Fix the minor issue found in net/local [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #11856:
URL: https://github.com/apache/nuttx/pull/11856#discussion_r1516127499


##########
net/local/local_accept.c:
##########
@@ -99,7 +98,7 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
                  FAR socklen_t *addrlen, FAR struct socket *newsock,
                  int flags)
 {
-  FAR struct local_conn_s *server;
+  FAR struct local_conn_s *server = psock->s_conn;

Review Comment:
   Yes, but my question was: is the psock and s_conn already DEBUGASSERTed in high end functions before reaching there? Otherwise we will need it.



-- 
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


Re: [PR] Fix the minor issue found in net/local [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #11856:
URL: https://github.com/apache/nuttx/pull/11856#discussion_r1515233989


##########
net/local/local_accept.c:
##########
@@ -99,7 +98,7 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
                  FAR socklen_t *addrlen, FAR struct socket *newsock,
                  int flags)
 {
-  FAR struct local_conn_s *server;
+  FAR struct local_conn_s *server = psock->s_conn;

Review Comment:
   Should we include a debug assertion for case where "server" is NULL ?



-- 
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