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 d029e88472 nuttx/net: fixed bind can not return error when used same addr. d029e88472 is described below commit d029e88472f7ea78126322916e154636b9d3ecd3 Author: zhushiqi <hiccup...@gmail.com> AuthorDate: Thu Apr 18 18:40:47 2024 +0800 nuttx/net: fixed bind can not return error when used same addr. Signed-off-by: zhushiqi <hiccup...@gmail.com> --- net/local/local_bind.c | 1 - net/local/local_sockif.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/net/local/local_bind.c b/net/local/local_bind.c index a218597ca3..a2d6489580 100644 --- a/net/local/local_bind.c +++ b/net/local/local_bind.c @@ -61,7 +61,6 @@ int psock_local_bind(FAR struct socket *psock, /* Save the address family */ - conn->lc_proto = psock->s_type; conn->lc_instance_id = -1; /* Now determine the type of the Unix domain socket by comparing the size diff --git a/net/local/local_sockif.c b/net/local/local_sockif.c index 66ff11fe80..ec1649c0e5 100644 --- a/net/local/local_sockif.c +++ b/net/local/local_sockif.c @@ -138,6 +138,7 @@ static int local_sockif_alloc(FAR struct socket *psock) /* Save the pre-allocated connection in the socket structure */ + conn->lc_proto = psock->s_type; psock->s_conn = conn; return OK; }