Change --server to --servers.
Prior to this commit --server took a list of servers, so making it plural makes sense.
This commit is contained in:
bovenliggende
df070fe2c3
commit
83fef49f59
@ -61,13 +61,13 @@ conn_add_servers(void)
|
||||
struct stat st;
|
||||
int fd, len;
|
||||
|
||||
fd = open(param.server, O_RDONLY, 0);
|
||||
fd = open(param.servers, O_RDONLY, 0);
|
||||
if (fd == -1)
|
||||
panic("%s: can't open %s\n", prog_name, param.server);
|
||||
panic("%s: can't open %s\n", prog_name, param.servers);
|
||||
|
||||
fstat(fd, &st);
|
||||
if (st.st_size == 0)
|
||||
panic("%s: file %s is empty\n", prog_name, param.server);
|
||||
panic("%s: file %s is empty\n", prog_name, param.servers);
|
||||
|
||||
srvbase = (char *)mmap(0, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (srvbase == (char *)-1)
|
||||
|
@ -963,7 +963,7 @@ core_init(void)
|
||||
printf("%s: maximum number of open descriptors = %ld\n",
|
||||
prog_name, rlimit.rlim_max);
|
||||
|
||||
if (param.server)
|
||||
if (param.servers)
|
||||
conn_add_servers();
|
||||
if (param.runtime) {
|
||||
arg.l = 0;
|
||||
|
@ -136,7 +136,7 @@ static struct option longopts[] = {
|
||||
{"retry-on-failure", no_argument, ¶m.retry_on_failure, 1},
|
||||
{"runtime", required_argument, (int *) ¶m.runtime, 0},
|
||||
{"send-buffer", required_argument, (int *) ¶m.send_buffer_size, 0},
|
||||
{"server", required_argument, (int *) ¶m.server, 0},
|
||||
{"servers", required_argument, (int *) ¶m.servers, 0},
|
||||
{"uri", required_argument, (int *) ¶m.uri, 0},
|
||||
{"session-cookies", no_argument, (int *) ¶m.session_cookies, 1},
|
||||
#ifdef HAVE_SSL
|
||||
@ -177,7 +177,7 @@ usage(void)
|
||||
"\t[--print-reply [header|body]] [--print-request [header|body]]\n"
|
||||
"\t[--rate X] [--recv-buffer N] [--retry-on-failure] "
|
||||
"[--send-buffer N]\n"
|
||||
"\t<--server file> [--port N] [--uri S] [--myaddr S]\n"
|
||||
"\t<--servers file> [--port N] [--uri S] [--myaddr S]\n"
|
||||
#ifdef HAVE_SSL
|
||||
"\t[--ssl] [--ssl-ciphers L] [--ssl-no-reuse]\n"
|
||||
"\t[--ssl-certificate file] [--ssl-key file]\n"
|
||||
@ -635,8 +635,8 @@ main(int argc, char **argv)
|
||||
prog_name, optarg);
|
||||
exit(1);
|
||||
}
|
||||
} else if (flag == ¶m.server)
|
||||
param.server = optarg;
|
||||
} else if (flag == ¶m.servers)
|
||||
param.servers = optarg;
|
||||
#ifdef HAVE_SSL
|
||||
else if (flag == ¶m.ssl_cipher_list)
|
||||
param.ssl_cipher_list = optarg;
|
||||
@ -974,9 +974,9 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (param.server == NULL) {
|
||||
if (param.servers == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: must specify --server\n",
|
||||
"%s: must specify --servers\n",
|
||||
prog_name);
|
||||
exit(-1);
|
||||
}
|
||||
@ -1131,8 +1131,8 @@ main(int argc, char **argv)
|
||||
if (param.runtime > 0)
|
||||
printf(" --runtime=%g", param.runtime);
|
||||
printf(" --client=%u/%u", param.client.id, param.client.num_clients);
|
||||
if (param.server)
|
||||
printf(" --server=%s", param.server);
|
||||
if (param.servers)
|
||||
printf(" --servers=%s", param.servers);
|
||||
if (param.port)
|
||||
printf(" --port=%d", param.port);
|
||||
if (param.uri)
|
||||
|
@ -91,7 +91,9 @@ Rate_Info;
|
||||
typedef struct Cmdline_Params
|
||||
{
|
||||
int http_version; /* (default) HTTP protocol version */
|
||||
const char *server;
|
||||
const char *server; /* (default) hostname */
|
||||
const char *server_name; /* fully qualified server name */
|
||||
const char *servers;
|
||||
int port; /* (default) server port */
|
||||
const char *uri; /* (default) uri */
|
||||
const char *myaddr;
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user