nghttpx: Simpler

This commit is contained in:
Tatsuhiro Tsujikawa 2017-02-23 22:32:04 +09:00
parent b647a7c5b7
commit 373be22d7e
1 changed files with 4 additions and 20 deletions

View File

@ -2426,16 +2426,8 @@ int parse_config(Config *config, int optid, const StringRef &opt,
config->logging.error.syslog = util::strieq_l("yes", optarg); config->logging.error.syslog = util::strieq_l("yes", optarg);
return 0; return 0;
case SHRPX_OPTID_FASTOPEN: { case SHRPX_OPTID_FASTOPEN:
int n; return parse_uint(&config->conn.listener.fastopen, opt, optarg);
if (parse_uint(&n, opt, optarg) != 0) {
return -1;
}
config->conn.listener.fastopen = n;
return 0;
}
case SHRPX_OPTID_BACKEND_KEEP_ALIVE_TIMEOUT: case SHRPX_OPTID_BACKEND_KEEP_ALIVE_TIMEOUT:
return parse_duration(&config->conn.downstream->timeout.idle_read, opt, return parse_duration(&config->conn.downstream->timeout.idle_read, opt,
optarg); optarg);
@ -2622,16 +2614,8 @@ int parse_config(Config *config, int optid, const StringRef &opt,
return 0; return 0;
} }
case SHRPX_OPTID_BACKLOG: { case SHRPX_OPTID_BACKLOG:
int n; return parse_uint(&config->conn.listener.backlog, opt, optarg);
if (parse_uint(&n, opt, optarg) != 0) {
return -1;
}
config->conn.listener.backlog = n;
return 0;
}
case SHRPX_OPTID_CIPHERS: case SHRPX_OPTID_CIPHERS:
config->tls.ciphers = make_string_ref(config->balloc, optarg); config->tls.ciphers = make_string_ref(config->balloc, optarg);