mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
net/local: add local_nextconn() helper
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
9d0da9818c
commit
805d3a2061
@@ -242,7 +242,7 @@ int psock_local_connect(FAR struct socket *psock,
|
||||
{
|
||||
FAR struct local_conn_s *client;
|
||||
FAR struct sockaddr_un *unaddr = (FAR struct sockaddr_un *)addr;
|
||||
FAR struct local_conn_s *conn;
|
||||
FAR struct local_conn_s *conn = NULL;
|
||||
|
||||
DEBUGASSERT(psock && psock->s_conn);
|
||||
client = (FAR struct local_conn_s *)psock->s_conn;
|
||||
@@ -256,9 +256,7 @@ int psock_local_connect(FAR struct socket *psock,
|
||||
/* Find the matching server connection */
|
||||
|
||||
net_lock();
|
||||
for (conn = (FAR struct local_conn_s *)g_local_listeners.head;
|
||||
conn;
|
||||
conn = (FAR struct local_conn_s *)dq_next(&conn->lc_node))
|
||||
while ((conn = local_nextconn(conn)) != NULL)
|
||||
{
|
||||
/* Anything in the listener list should be a stream socket in the
|
||||
* listening state
|
||||
|
||||
Reference in New Issue
Block a user