Skip to content

Commit

Permalink
hs: Improve warning for bad service version
Browse files Browse the repository at this point in the history
Now that we don't have version 2, it gives us:

  [warn] HiddenServiceVersion must be between 3 and 3, not 2.

This commit changes it to:

  [warn] HiddenServiceVersion must be 3, not 2.

Part of #40476

Signed-off-by: David Goulet <[email protected]>
  • Loading branch information
dgoulet-tor committed Oct 19, 2021
1 parent 18b5630 commit 44e105c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/feature/hs/hs_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ helper_parse_uint64(const char *opt, const char *value, uint64_t min,
*ok = 0;
ret = tor_parse_uint64(value, 10, min, max, ok, NULL);
if (!*ok) {
log_warn(LD_CONFIG, "%s must be between %" PRIu64 " and %"PRIu64
", not %s.",
opt, min, max, value);
if (min == max) {
log_warn(LD_CONFIG, "%s must be %" PRIu64 ", not %s.", opt, max, value);
} else {
log_warn(LD_CONFIG, "%s must be between %" PRIu64 " and %"PRIu64
", not %s.",
opt, min, max, value);
}
goto err;
}
log_info(LD_CONFIG, "%s was parsed to %" PRIu64, opt, ret);
Expand Down

0 comments on commit 44e105c

Please sign in to comment.