a-lunev commented on a change in pull request #5434:
URL: https://github.com/apache/incubator-nuttx/pull/5434#discussion_r801574906



##########
File path: net/ieee802154/ieee802154_sockif.c
##########
@@ -381,9 +381,11 @@ static int ieee802154_bind(FAR struct socket *psock,
       return -EBADF;
     }
 
+  conn = (FAR struct ieee802154_conn_s *)psock->s_conn;

Review comment:
       There are still many places where psock->s_conn is introduced w/o 
DEBUGASSERT(conn != NULL). Do you think the debug asserts are not reasonable 
for them?

##########
File path: net/socket/socket.c
##########
@@ -129,16 +119,22 @@ int psock_socket(int domain, int type, int protocol,
       psock->s_sockif = sockif;
 
       ret = sockif->si_setup(psock, protocol);
-      if (ret < 0)
+    }
+
+  if (ret >= 0)
+    {
+      FAR struct socket_conn_s *conn = psock->s_conn;
+
+      if (type & SOCK_NONBLOCK)
         {
-          nerr("ERROR: socket si_setup() failed: %d\n", ret);
-          return ret;
+          conn->s_flags |= _SF_NONBLOCK;
         }
-    }
 
-  /* The socket has been successfully initialized */
+      /* The socket has been successfully initialized */
+
+      conn->s_flags |= _SF_INITD;
+    }

Review comment:
       Is nerr() lost here?




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


Reply via email to