summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2011-06-02 13:30:32 +0200
committerSebastian Hahn <sebastian@torproject.org>2011-06-02 13:44:33 +0200
commitdf42eb0a18a9f6fe4b729a1c9a63bb6ab247f631 (patch)
tree3906bf0dba7f68ea01c87f1a8c415075035034e6 /src/or/connection.c
parent1d8bcba067ef8d96ebe022f06459d55c308343ec (diff)
downloadtor-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/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 3dcb573759..3f4ca1db4b 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1952,7 +1952,7 @@ retry_all_listeners(smartlist_t *replaced_conns,
or_options_t *options = get_options();
int retval = 0;
const uint16_t old_or_port = router_get_advertised_or_port(options);
- const uint16_t old_dir_port = router_get_advertised_dir_port(options);
+ const uint16_t old_dir_port = router_get_advertised_dir_port(options, 0);
if (retry_listeners(CONN_TYPE_OR_LISTENER, options->ORListenAddress,
options->ORPort, "0.0.0.0",
@@ -1998,7 +1998,7 @@ retry_all_listeners(smartlist_t *replaced_conns,
return -1;
if (old_or_port != router_get_advertised_or_port(options) ||
- old_dir_port != router_get_advertised_dir_port(options)) {
+ old_dir_port != router_get_advertised_dir_port(options, 0)) {
/* Our chosen ORPort or DirPort is not what it used to be: the
* descriptor we had (if any) should be regenerated. (We won't
* automatically notice this because of changes in the option,