commit 8d730af0f7cd041cd83c237ca0f102ff076c18b0
parent fade313ba30279b76794368b4ff9e97be6bb159d
Author: Alexander Færøy <ahf@torproject.org>
Date: Mon, 15 May 2017 14:50:04 +0200
Remove old consensus fetching code from handle_get_current_consensus().
This patch removes the calls to spooled_resource_new() when trying to
download the consensus. All calls should now be going through the
consdiff manager.
See: https://bugs.torproject.org/21667
Diffstat:
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/or/directory.c b/src/or/directory.c
@@ -3856,17 +3856,9 @@ handle_get_current_consensus(dir_connection_t *conn,
spooled_resource_t *spooled;
if (cached_consensus) {
spooled = spooled_resource_new_from_cache_entry(cached_consensus);
- } else if (flavor) {
- spooled = spooled_resource_new(DIR_SPOOL_NETWORKSTATUS,
- (uint8_t*)flavor, strlen(flavor));
- compression_used = ZLIB_METHOD;
- } else {
- spooled = spooled_resource_new(DIR_SPOOL_NETWORKSTATUS,
- NULL, 0);
- compression_used = ZLIB_METHOD;
+ smartlist_add(conn->spool, spooled);
}
tor_free(flavor);
- smartlist_add(conn->spool, spooled);
}
lifetime = (have_fresh_until && fresh_until > now) ? fresh_until - now : 0;