[or-cvs] Backport:Do not check whether DirPort is reachable when we ...
Nick Mathewson
nickm at seul.org
Wed Oct 12 04:08:05 UTC 2005
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv19522/src/or
Modified Files:
Tag: tor-0_1_0-patches
router.c
Log Message:
Backport:Do not check whether DirPort is reachable when we are suppressing it because of hibernation.
Index: router.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/router.c,v
retrieving revision 1.176.2.6
retrieving revision 1.176.2.7
diff -u -d -r1.176.2.6 -r1.176.2.7
--- router.c 13 Sep 2005 21:40:23 -0000 1.176.2.6
+++ router.c 12 Oct 2005 04:08:02 -0000 1.176.2.7
@@ -387,7 +387,9 @@
}
/** Return 1 if we don't have a dirport configured, or if it's reachable. */
int check_whether_dirport_reachable(void) {
- return !get_options()->DirPort || can_reach_dir_port;
+ routerinfo_t *ri = router_get_my_routerinfo();
+ return !get_options()->DirPort || (ri && !ri->dir_port)
+ || can_reach_dir_port;
}
void consider_testing_reachability(void) {
More information about the tor-commits
mailing list