aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJon Dugan <jdugan@x1024.net>2010-02-09 07:29:13 +0000
committerJon Dugan <jdugan@x1024.net>2010-02-09 07:29:13 +0000
commite088d2d30575e349efec9740c5f760643883d5eb (patch)
treee768402715f7325b47f40557caf25164a7cd5766 /src/main.c
parenta067fb27c2843d27f767b691763a5ee5dc200d4d (diff)
downloadiperf3-e088d2d30575e349efec9740c5f760643883d5eb.tar.gz
move the parameter exchange into iperf_run_client() where it belongs; propogate return status
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 2b7b5bb..86f1a47 100644
--- a/src/main.c
+++ b/src/main.c
@@ -237,13 +237,8 @@ main(int argc, char **argv)
//printf("in main: calling iperf_init_test \n");
if (test->role == 'c')
printf("Connecting to port %d on host %s \n", test->server_port, test->server_hostname);
- iperf_init_test(test);
- if (test->role == 'c') /* if client, send params to server */
- {
- exchange_parameters(test);
- test->streams->settings->state = STREAM_BEGIN;
- }
+ iperf_init_test(test);
//printf("in main: calling iperf_run \n");
iperf_run(test);
@@ -271,8 +266,7 @@ iperf_run(struct iperf_test * test)
}
return 0;
case 'c':
- iperf_run_client(test);
- return 0;
+ return iperf_run_client(test);
default:
return -1;
}