diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-30 14:58:27 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-10-01 18:14:27 -0400 |
commit | 45f1e4d5ee7b6e2308655628d18a67d330d9b624 (patch) | |
tree | e78de04bf2888e7ca2abe5b80f91ae01949cd795 /src/or/routerlist.c | |
parent | 26e897420e07611e0b2c10b28202c388eea4bd6b (diff) | |
download | tor-45f1e4d5ee7b6e2308655628d18a67d330d9b624.tar.gz tor-45f1e4d5ee7b6e2308655628d18a67d330d9b624.zip |
Rename routerstatus_t.is_running to is_flagged_running
This was the only flag in routerstatus_t that we would previously
change in a routerstatus_t in a consensus. We no longer have reason
to do so -- and probably never did -- as you can now confirm more
easily than you could have done by grepping for is_running before
this patch.
The name change is to emphasize that the routerstatus_t is_running
flag is only there to tell you whether the consensus says it's
running, not whether it *you* think it's running.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index e456f4385b..a082ff410e 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -1276,8 +1276,7 @@ mark_all_trusteddirservers_up(void) dir->is_running = 1; download_status_reset(&dir->v2_ns_dl_status); rs = router_get_mutable_consensus_status_by_id(dir->digest); - if (rs && !rs->is_running) { - rs->is_running = 1; + if (rs) { rs->last_dir_503_at = 0; control_event_networkstatus_changed_single(rs); } @@ -3186,7 +3185,6 @@ void router_set_status(const char *digest, int up) { node_t *node; - routerstatus_t *status; tor_assert(digest); SMARTLIST_FOREACH(trusted_dir_servers, trusted_dir_server_t *, d, @@ -3207,12 +3205,15 @@ router_set_status(const char *digest, int up) node->is_running = up; } - /*XXXX NM don't change routerstatus's is_running. */ +#if 0 + /* No, don't change routerstatus's is_running. I have confirmed that + * nothing uses it to ask "is the node running? */ status = router_get_mutable_consensus_status_by_id(digest); if (status && status->is_running != up) { status->is_running = up; control_event_networkstatus_changed_single(status); } +#endif router_dir_info_changed(); } @@ -4237,7 +4238,7 @@ initiate_descriptor_downloads(const routerstatus_t *source, static INLINE int client_would_use_router(routerstatus_t *rs, time_t now, or_options_t *options) { - if (!rs->is_running && !options->FetchUselessDescriptors) { + if (!rs->is_flagged_running && !options->FetchUselessDescriptors) { /* If we had this router descriptor, we wouldn't even bother using it. * But, if we want to have a complete list, fetch it anyway. */ return 0; |