diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-05-08 12:12:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-05-25 12:52:25 -0400 |
commit | b998fed9b967924aa880f73c685284a052c8acfe (patch) | |
tree | e67ea3eecbeca9f11caa08ba8594b64af7393ca2 /src/or/dirserv.c | |
parent | b1e61353ecab03a3714bd52d5a45a933ce4f76d1 (diff) | |
download | tor-b998fed9b967924aa880f73c685284a052c8acfe.tar tor-b998fed9b967924aa880f73c685284a052c8acfe.tar.gz |
Remove support for events without the extended format or long names.
Supporting the old formats made our code complex; running without them
has been discouraged since 0.2.1.x.
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index dde8959f8..f58607644 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -964,7 +964,6 @@ dirserv_set_router_is_running(routerinfo_t *router, time_t now) * *<b>router_status_out</b>. Return 0 on success, -1 on failure. * * If for_controller is true, include the routers with very old descriptors. - * If for_controller is >1, use the verbose nickname format. */ int list_server_status_v1(smartlist_t *routers, char **router_status_out, @@ -984,23 +983,22 @@ list_server_status_v1(smartlist_t *routers, char **router_status_out, rs_entries = smartlist_create(); - SMARTLIST_FOREACH(routers, routerinfo_t *, ri, - { + SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) { if (authdir) { /* Update router status in routerinfo_t. */ dirserv_set_router_is_running(ri, now); } - if (for_controller == 1 || ri->cache_info.published_on >= cutoff) - smartlist_add(rs_entries, list_single_server_status(ri, ri->is_running)); - else if (for_controller > 2) { + if (for_controller) { char name_buf[MAX_VERBOSE_NICKNAME_LEN+2]; char *cp = name_buf; if (!ri->is_running) *cp++ = '!'; router_get_verbose_nickname(cp, ri); smartlist_add(rs_entries, tor_strdup(name_buf)); + } else if (ri->cache_info.published_on >= cutoff) { + smartlist_add(rs_entries, list_single_server_status(ri, ri->is_running)); } - }); + } SMARTLIST_FOREACH_END(ri); *router_status_out = smartlist_join_strings(rs_entries, " ", 0, NULL); |