mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
netutils/rexecd: fix rpname mismatch with rexec when using AF_RPMSG
When using AF_RPMSG (-r option), rexecd was setting the rp_name to the raw port number, while rexec was using htons(port). This caused a mismatch where rexec couldn't connect to rexecd. This commit fixes the issue by applying htons() to REXECD_PORT when setting rp_name in the AF_RPMSG case, making it consistent with the rexec client implementation. Signed-off-by: fangpeina <fangpeina@xiaomi.com>
This commit is contained in:
parent
b2d4ad67b1
commit
eb9b9a2d60
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ int main(int argc, FAR char **argv)
|
|||
case AF_RPMSG:
|
||||
((FAR struct sockaddr_rpmsg *)&addr)->rp_family = AF_RPMSG;
|
||||
snprintf(((FAR struct sockaddr_rpmsg *)&addr)->rp_name,
|
||||
RPMSG_SOCKET_NAME_SIZE, "%d", REXECD_PORT);
|
||||
RPMSG_SOCKET_NAME_SIZE, "%d", htons(REXECD_PORT));
|
||||
ret = sizeof(struct sockaddr_rpmsg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue