diff options
author | Roger Dingledine <arma@torproject.org> | 2005-04-01 07:42:32 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-04-01 07:42:32 +0000 |
commit | a28ae7a70c8cd55b9341ad425b8b6878273910b9 (patch) | |
tree | 3454b313db3d78c95e020f97c36eb6b7542a56e0 /src/or | |
parent | cd25e56ad22d37ac20cc8376b80df3e4b512dad4 (diff) | |
download | tor-a28ae7a70c8cd55b9341ad425b8b6878273910b9.tar.gz tor-a28ae7a70c8cd55b9341ad425b8b6878273910b9.zip |
fix assert: if our dirport isn't reachable yet, don't trick
*ourselves* into thinking the dirport is zero. but continue
to tell other people that it is.
svn:r3952
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/router.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c index a717f33d9c..3ab1ddbd9c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -680,7 +680,7 @@ int router_rebuild_descriptor(int force) { ri->nickname = tor_strdup(options->Nickname); ri->addr = addr; ri->or_port = options->ORPort; - ri->dir_port = (hibernating || !check_whether_dirport_reachable()) ? + ri->dir_port = hibernating ? 0 : options->DirPort; ri->published_on = time(NULL); ri->onion_pkey = crypto_pk_dup_key(get_onion_key()); /* must invoke from main thread */ @@ -830,7 +830,7 @@ int router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router, router->nickname, router->address, router->or_port, - router->dir_port, + check_whether_dirport_reachable ? router->dir_port : 0, router->platform, published, fingerprint, |