diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-01-29 15:17:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-01-29 15:17:05 -0500 |
commit | 3193cbe2bab9749f0e3cb48a31f6c1c8c61707a7 (patch) | |
tree | 72ce97eb89ecf28cced0f2098f1d23b4bc2f4283 /src/or/control.c | |
parent | 4fe253ef40a96dbfb978752e9d2833e8b491ca28 (diff) | |
download | tor-3193cbe2bab9749f0e3cb48a31f6c1c8c61707a7.tar.gz tor-3193cbe2bab9749f0e3cb48a31f6c1c8c61707a7.zip |
Rip out all of the v2 directory code.
The remaining vestige is that we continue to publish the V2dir flag,
and that, for the controller, we continue to emit v2 directory
formats when requested.
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/or/control.c b/src/or/control.c index 49212de65f..11dd4ee59d 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1747,39 +1747,7 @@ getinfo_helper_dir(control_connection_t *control_conn, tor_free(url); smartlist_free(descs); } else if (!strcmpstart(question, "dir/status/")) { - if (directory_permits_controller_requests(get_options())) { - size_t len=0; - char *cp; - smartlist_t *status_list = smartlist_new(); - dirserv_get_networkstatus_v2(status_list, - question+strlen("dir/status/")); - SMARTLIST_FOREACH(status_list, cached_dir_t *, d, len += d->dir_len); - cp = *answer = tor_malloc(len+1); - SMARTLIST_FOREACH(status_list, cached_dir_t *, d, { - memcpy(cp, d->dir, d->dir_len); - cp += d->dir_len; - }); - *cp = '\0'; - smartlist_free(status_list); - } else { - smartlist_t *fp_list = smartlist_new(); - smartlist_t *status_list = smartlist_new(); - dirserv_get_networkstatus_v2_fingerprints( - fp_list, question+strlen("dir/status/")); - SMARTLIST_FOREACH(fp_list, const char *, fp, { - char *s; - char *fname = networkstatus_get_cache_filename(fp); - s = read_file_to_str(fname, 0, NULL); - if (s) - smartlist_add(status_list, s); - tor_free(fname); - }); - SMARTLIST_FOREACH(fp_list, char *, fp, tor_free(fp)); - smartlist_free(fp_list); - *answer = smartlist_join_strings(status_list, "", 0, NULL); - SMARTLIST_FOREACH(status_list, char *, s, tor_free(s)); - smartlist_free(status_list); - } + *answer = tor_strdup(""); } else if (!strcmp(question, "dir/status-vote/current/consensus")) { /* v3 */ if (directory_caches_dir_info(get_options())) { const cached_dir_t *consensus = dirserv_get_consensus("ns"); |