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 2021/07/19 13:06:44 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on a change in pull request #4179: Update socket rpmsg

gustavonihei commented on a change in pull request #4179:
URL: https://github.com/apache/incubator-nuttx/pull/4179#discussion_r672279701



##########
File path: net/rpmsg/rpmsg_sockif.c
##########
@@ -505,8 +502,25 @@ static void rpmsg_socket_ns_bind(FAR struct rpmsg_device *rdev,
   strcpy(new->rpaddr.rp_cpu, rpmsg_get_cpuname(rdev));
   strcpy(new->rpaddr.rp_name, name);
 
+  rpmsg_socket_lock(&server->recvlock);
+
+  for (tmp = server; tmp->next; tmp = tmp->next)
+    {
+      if (++cnt >= server->backlog)
+        {
+          /* Reject the connection */
+
+          rpmsg_destroy_ept(&new->ept);
+          rpmsg_socket_free(new);
+          rpmsg_socket_lock(&server->recvlock);

Review comment:
       ```suggestion
             rpmsg_socket_unlock(&server->recvlock);
   ```
   Shouldn't you unlock here instead?




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