diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-06-02 13:30:32 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-06-02 13:44:33 +0200 |
commit | df42eb0a18a9f6fe4b729a1c9a63bb6ab247f631 (patch) | |
tree | 3906bf0dba7f68ea01c87f1a8c415075035034e6 /src/or/dirserv.c | |
parent | 1d8bcba067ef8d96ebe022f06459d55c308343ec (diff) | |
download | tor-df42eb0a18a9f6fe4b729a1c9a63bb6ab247f631.tar.gz tor-df42eb0a18a9f6fe4b729a1c9a63bb6ab247f631.zip |
Fix unit test failure in dir/formats
options->DirPort is 0 in the unit tests, so
router_get_advertised_dir_port() would return 0 so we wouldn't pick a
dirport. This isn't what we want for the unit tests. Fixes bug
introduced in 95ac3ea5946.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index e9355fedb4..d114d8654e 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2705,7 +2705,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key, voter->sigs = smartlist_create(); voter->address = hostname; voter->addr = addr; - voter->dir_port = router_get_advertised_dir_port(options); + voter->dir_port = router_get_advertised_dir_port(options, 0); voter->or_port = router_get_advertised_or_port(options); voter->contact = tor_strdup(contact); if (options->V3AuthUseLegacyKey) { @@ -2812,7 +2812,8 @@ generate_v2_networkstatus_opinion(void) "dir-options%s%s%s%s\n" "%s" /* client version line, server version line. */ "dir-signing-key\n%s", - hostname, ipaddr, (int)router_get_advertised_dir_port(options), + hostname, ipaddr, + (int)router_get_advertised_dir_port(options, 0), fingerprint, contact, published, |