forked from nuttx/nuttx-update
net/rpmsg: Set family for rpaddr in ns_bind
The rpmsg addr get from socket accept has rp_family=0, which is not intended, to avoid wrong logic in other place, set the rp_family in ns_bind function. Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
This commit is contained in:
parent
6ca0f90d43
commit
9f8d587b64
1 changed files with 1 additions and 0 deletions
|
@ -518,6 +518,7 @@ static void rpmsg_socket_ns_bind(FAR struct rpmsg_device *rdev,
|
|||
return;
|
||||
}
|
||||
|
||||
new->rpaddr.rp_family = AF_RPMSG;
|
||||
strlcpy(new->rpaddr.rp_cpu, rpmsg_get_cpuname(rdev),
|
||||
sizeof(new->rpaddr.rp_cpu));
|
||||
strlcpy(new->rpaddr.rp_name, name + RPMSG_SOCKET_NAME_PREFIX_LEN,
|
||||
|
|
Loading…
Reference in a new issue