rptun_ping: add sleep param to rptun_ping

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd
2022-05-11 12:31:25 +08:00
committed by Xiang Xiao
parent 79a137495a
commit a109a6e58b
2 changed files with 6 additions and 4 deletions

View File

@@ -393,7 +393,8 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
}
else if (strcmp(argv[1], "ping") == 0)
{
if (argv[3] == 0 || argv[4] == 0 || argv[5] == 0)
if (argv[3] == 0 || argv[4] == 0 ||
argv[5] == 0 || argv[6] == 0)
{
return ERROR;
}
@@ -401,6 +402,7 @@ static int cmd_rptun_once(FAR struct nsh_vtbl_s *vtbl,
ping.times = atoi(argv[3]);
ping.len = atoi(argv[4]);
ping.ack = atoi(argv[5]);
ping.sleep = atoi(argv[6]);
cmd = RPTUNIOC_PING;
val = (unsigned long)&ping;