don't whine about reachability if the guy is hibernating now.

speaking of which, we don't actually parse is_hibernating out
of the router descriptor right now. nick, can you fix this?


svn:r4886
This commit is contained in:
Roger Dingledine 2005-08-30 06:48:24 +00:00
parent e9524f9d2d
commit 4240410a9d
2 changed files with 4 additions and 1 deletions

View file

@ -508,6 +508,8 @@ static int
dirserv_thinks_router_is_blatantly_unreachable(routerinfo_t *router, time_t now)
{
connection_t *conn;
if (router->is_hibernating)
return 0;
conn = connection_get_by_identity_digest(router->identity_digest,
CONN_TYPE_OR);
if (conn && conn->state == OR_CONN_STATE_OPEN &&

View file

@ -736,6 +736,7 @@ typedef struct {
addr_policy_t *exit_policy; /**< What streams will this OR permit
* to exit? */
long uptime; /**< How many seconds the router claims to have been up */
uint8_t is_hibernating; /**< Whether the router claims to be hibernating */
smartlist_t *declared_family; /**< Nicknames of router which this router
* claims are its family. */
char *contact_info; /**< Declared contact info for this router. */
@ -747,7 +748,7 @@ typedef struct {
* (For Authdir: Have we validated this OR?)
*/
/* The below items are used only by authdirservers right now for
/* The below items are used only by authdirservers for
* reachability testing. */
time_t last_reachable; /**< When was the last time we could reach this OR? */
time_t testing_since; /**< When did we start testing reachability for this OR? */