diff options
author | David Goulet <dgoulet@torproject.org> | 2017-07-12 13:52:19 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-07-13 16:50:09 -0400 |
commit | 3eeebd1b0ca43bc2523fb39349078277a40d4116 (patch) | |
tree | 4118b5a2ec170d6ee033bf390fc023bfdc3723a0 /src/or/hs_config.c | |
parent | f64689f3f00d72033ff7544ada4ccdfb7c328b36 (diff) | |
download | tor-3eeebd1b0ca43bc2523fb39349078277a40d4116.tar.gz tor-3eeebd1b0ca43bc2523fb39349078277a40d4116.zip |
prop224: Use the service config object when configuring
Both configuration function now takes the service config object instead of the
service itself.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_config.c')
-rw-r--r-- | src/or/hs_config.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/or/hs_config.c b/src/or/hs_config.c index c29315f6cf..7e0124bb34 100644 --- a/src/or/hs_config.c +++ b/src/or/hs_config.c @@ -236,18 +236,13 @@ config_validate_service(const hs_service_config_t *config) * Return 0 on success else a negative value. */ static int config_service_v3(const config_line_t *line_, - const or_options_t *options, - hs_service_t *service) + hs_service_config_t *config) { - (void) options; int have_num_ip = 0; const char *dup_opt_seen = NULL; const config_line_t *line; - hs_service_config_t *config; - - tor_assert(service); - config = &service->config; + tor_assert(config); for (line = line_; line; line = line->next) { int ok = 0; @@ -489,10 +484,10 @@ config_service(const config_line_t *line, const or_options_t *options, * directory line, the function knows that it has to stop parsing. */ switch (service->version) { case HS_VERSION_TWO: - ret = rend_config_service(line->next, options, service); + ret = rend_config_service(line->next, options, &service->config); break; case HS_VERSION_THREE: - ret = config_service_v3(line->next, options, service); + ret = config_service_v3(line->next, &service->config); break; default: /* We do validate before if we support the parsed version. */ |