You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/11 12:52:15 UTC
[incubator-nuttx-apps] 04/05: iperf: Make -t0 the default for
server mode
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 37bc863eb75de133866353f2b2c2c483a5b68bb0
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Jun 10 14:11:16 2021 +0900
iperf: Make -t0 the default for server mode
It matches the original iperf behavior.
Note: -t is a client-only option for the original iperf 2.xx.
Note: You can still choose the previous behavior by
explictly specifying -t.
---
netutils/iperf/iperf_main.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/netutils/iperf/iperf_main.c b/netutils/iperf/iperf_main.c
index e31d799..9fa71e1 100644
--- a/netutils/iperf/iperf_main.c
+++ b/netutils/iperf/iperf_main.c
@@ -204,7 +204,16 @@ int main(int argc, FAR char *argv[])
if (iperf_args.time->count == 0)
{
- cfg.time = IPERF_DEFAULT_TIME;
+ if (iperf_args.server->count != 0)
+ {
+ /* Note: -t is a client-only option for the original iperf 2. */
+
+ cfg.time = 0;
+ }
+ else
+ {
+ cfg.time = IPERF_DEFAULT_TIME;
+ }
}
else
{