Commit d338ba17 authored by Joanne Hugé's avatar Joanne Hugé

Fix mistakes in server.c

parent ac8f6f5e
......@@ -162,7 +162,7 @@ int main(int argc, char *argv[]) {
static void process_options(int argc, char *argv[], thread_param_t *param,
main_param_t *main_param) {
for (;;) {
int c = getopt(argc, argv, "abd:p:r:");
int c = getopt(argc, argv, "abd:f:p:r:");
if (c == -1) break;
......@@ -194,5 +194,11 @@ static void process_options(int argc, char *argv[], thread_param_t *param,
break;
}
}
if (argc != optind + 1) {
printf("Usage: %s client_ip\n", argv[0]);
exit(EXIT_FAILURE);
}
param->ip_address = argv[optind];
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment