vuhuyhop197 commented on code in PR #7083:
URL: https://github.com/apache/incubator-nuttx/pull/7083#discussion_r972845984


##########
net/socket/getsockopt.c:
##########
@@ -337,50 +337,51 @@ int psock_getsockopt(FAR struct socket *psock, int level, 
int option,
       return -EBADF;
     }
 
-  /* Handle retrieval of the socket option according to the level at which
-   * option should be applied.
-   */
+#ifdef CONFIG_NET_USRSOCK
+  /* Try usrsock further if the protocol not available */
 
-  switch (level)
+  if (psock->s_type == SOCK_USRSOCK_TYPE)
     {
-      case SOL_SOCKET:   /* Socket-level options (see include/sys/socket.h) */
-       ret = psock_socketlevel_option(psock, option, value, value_len);
-       break;
+      ret = usrsock_getsockopt(psock->s_conn, level,
+                               option, value, value_len);
+    }
+  else

Review Comment:
   Thanks for your suggestion. I will try with the ioctl. For the usrsock 
driver, it's under develop now.



-- 
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-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to