diff options
author | sethdelliott <devnull@localhost> | 2010-06-24 22:02:24 +0000 |
---|---|---|
committer | sethdelliott <devnull@localhost> | 2010-06-24 22:02:24 +0000 |
commit | 29e3ec74c3a7554bcc3100ac96198374f33cfd97 (patch) | |
tree | f1350a34023e1be00890fc6f2adafc83e018f3c4 /src/main.c | |
parent | 59aaeda792db7291ed1b4417ba2450b95db84c0f (diff) | |
download | iperf3-29e3ec74c3a7554bcc3100ac96198374f33cfd97.tar.gz |
Fixed a bug that caused getopt not to work properly when command line arguments are given to the server.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -229,6 +229,11 @@ main(int argc, char **argv) } } + /* For subsequent calls to getopt */ + optreset = 1; + optind = 0; + + /* exit until this is done.... */ if (test->protocol == Pudp) { printf("UDP mode not yet supported. Exiting. \n"); @@ -252,18 +257,9 @@ main(int argc, char **argv) int iperf_run(struct iperf_test * test) { - - test->default_settings->state = TEST_RUNNING; - switch (test->role) { case 's': -// The following lines are commented out until I fix the bind issue with porting -// while (1) { - iperf_run_server(test); -// test->streams = NULL; -// sleep(1); -// } - return 0; + return iperf_run_server(test); case 'c': return iperf_run_client(test); default: |