iperf: accept -t 0, meaning forever
This commit is contained in:
parent
d2b7d79f1d
commit
b9ad64627d
@ -264,7 +264,7 @@ static void iperf_report_task(void *arg)
|
||||
now_len,
|
||||
(((double)(now_len - last_len) * 8) /
|
||||
ts_diff(&now, &last) / 1e6));
|
||||
if (ts_diff(&now, &start) >= time)
|
||||
if (time != 0 && ts_diff(&now, &start) >= time)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ int main(int argc, FAR char *argv[])
|
||||
else
|
||||
{
|
||||
cfg.time = iperf_args.time->ival[0];
|
||||
if (cfg.time <= cfg.interval)
|
||||
if (cfg.time != 0 && cfg.time <= cfg.interval)
|
||||
{
|
||||
cfg.time = cfg.interval;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user