You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/07/14 01:57:29 UTC
[nuttx] branch master updated: net/local: Support the abstract path to connect
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7544b68aa9 net/local: Support the abstract path to connect
7544b68aa9 is described below
commit 7544b68aa9ee4258a160227cf3baf78d0df1255e
Author: yintao <yi...@xiaomi.com>
AuthorDate: Wed Jun 7 12:11:44 2023 +0800
net/local: Support the abstract path to connect
Signed-off-by: yintao <yi...@xiaomi.com>
---
net/local/local_accept.c | 3 +--
net/local/local_listen.c | 3 +--
net/local/local_netpoll.c | 10 ++++------
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/net/local/local_accept.c b/net/local/local_accept.c
index e1f099e425..63d921b6f8 100644
--- a/net/local/local_accept.c
+++ b/net/local/local_accept.c
@@ -125,8 +125,7 @@ int local_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
server = psock->s_conn;
if (server->lc_proto != SOCK_STREAM ||
- server->lc_state != LOCAL_STATE_LISTENING ||
- server->lc_type != LOCAL_TYPE_PATHNAME)
+ server->lc_state != LOCAL_STATE_LISTENING)
{
return -EOPNOTSUPP;
}
diff --git a/net/local/local_listen.c b/net/local/local_listen.c
index 89a3c1b266..08125afba1 100644
--- a/net/local/local_listen.c
+++ b/net/local/local_listen.c
@@ -86,8 +86,7 @@ int local_listen(FAR struct socket *psock, int backlog)
/* Some sanity checks */
if (server->lc_proto != SOCK_STREAM ||
- server->lc_state == LOCAL_STATE_UNBOUND ||
- server->lc_type != LOCAL_TYPE_PATHNAME)
+ server->lc_state == LOCAL_STATE_UNBOUND)
{
net_unlock();
return -EOPNOTSUPP;
diff --git a/net/local/local_netpoll.c b/net/local/local_netpoll.c
index f1df7756fd..c519658639 100644
--- a/net/local/local_netpoll.c
+++ b/net/local/local_netpoll.c
@@ -168,9 +168,8 @@ int local_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
}
#ifdef CONFIG_NET_LOCAL_STREAM
- if ((conn->lc_state == LOCAL_STATE_LISTENING ||
- conn->lc_state == LOCAL_STATE_CONNECTING) &&
- conn->lc_type == LOCAL_TYPE_PATHNAME)
+ if (conn->lc_state == LOCAL_STATE_LISTENING ||
+ conn->lc_state == LOCAL_STATE_CONNECTING)
{
return local_event_pollsetup(conn, fds, true);
}
@@ -322,9 +321,8 @@ int local_pollteardown(FAR struct socket *psock, FAR struct pollfd *fds)
}
#ifdef CONFIG_NET_LOCAL_STREAM
- if ((conn->lc_state == LOCAL_STATE_LISTENING ||
- conn->lc_state == LOCAL_STATE_CONNECTING) &&
- conn->lc_type == LOCAL_TYPE_PATHNAME)
+ if (conn->lc_state == LOCAL_STATE_LISTENING ||
+ conn->lc_state == LOCAL_STATE_CONNECTING)
{
return local_event_pollsetup(conn, fds, false);
}