mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 18:27:56 +08:00
nuttx/net: fixed bind can not return error when used same addr.
Signed-off-by: zhushiqi <hiccupzhu@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user