mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
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
This commit is contained in:
committed by
Nick Mathewson
parent
fade313ba3
commit
8d730af0f7
+1
-9
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user