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
This commit is contained in:
Roger Dingledine 2005-04-01 07:42:32 +00:00
parent cd25e56ad2
commit a28ae7a70c

View File

@ -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,