[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Remove old consensus fetching code from handle_get_current_consensus().



commit 8d730af0f7cd041cd83c237ca0f102ff076c18b0
Author: Alexander Færøy <ahf@xxxxxxxxxxxxxx>
Date:   Mon May 15 14:50:04 2017 +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
---
 src/or/directory.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/or/directory.c b/src/or/directory.c
index dbee0b3..6504e2e 100644
--- 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;



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits