Fixed an error when compiling on Ubuntu systems. Also fixed a small server memory leak.

This commit is contained in:
sethdelliott 2010-07-01 21:21:04 +00:00
parent efb7bbe44b
commit bfd0c25dba
3 changed files with 6 additions and 3 deletions

View File

@ -341,8 +341,9 @@ parse_parameters(struct iperf_test *test)
break;
}
}
// XXX: optreset is not needed on ubuntu
#ifdef __APPLE__
optreset = 1;
#endif
optind = 0;
free(params);

View File

@ -284,10 +284,10 @@ iperf_run_server(struct iperf_test *test)
fprintf(stderr, "Unable to send SERVER_TERMINATE message to client\n");
}
}
exit(1);
return 0;
}
for (;;) {
for ( ; ; ) {
test->state = IPERF_START;
streams_accepted = 0;

View File

@ -223,7 +223,9 @@ main(int argc, char **argv)
}
/* For subsequent calls to getopt */
#ifdef __APPLE__
optreset = 1;
#endif
optind = 0;