]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
remove code related to tracking descriptor serving times
authorSebastian Hahn <sebastian@torproject.org>
Fri, 7 Oct 2011 00:42:52 +0000 (02:42 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 21 Oct 2011 04:02:47 +0000 (06:02 +0200)
This had broken due to bitrot - it doesn't know about microdescriptors
at all, and afaik hasn't generally been used in ages.

changes/remove_TRACK_SERVED_TIME [new file with mode: 0644]
src/or/dirserv.c
src/or/or.h

diff --git a/changes/remove_TRACK_SERVED_TIME b/changes/remove_TRACK_SERVED_TIME
new file mode 100644 (file)
index 0000000..cd5d380
--- /dev/null
@@ -0,0 +1,4 @@
+  o Removed features:
+    - Remove the ability to define TRACK_SERVED_TIME. The feature wasn't used
+      and is now outdated that microdescriptors are around.
+
index 96a5913a57efbc4abb4c55bcd3ebbb8833856e34..f64dcff33b923427945deacc183500c1fd39460d 100644 (file)
@@ -3482,9 +3482,6 @@ connection_dirserv_finish_spooling(dir_connection_t *conn)
 static int
 connection_dirserv_add_servers_to_outbuf(dir_connection_t *conn)
 {
-#ifdef TRACK_SERVED_TIME
-  time_t now = time(NULL);
-#endif
   int by_fp = (conn->dir_spool_src == DIR_SPOOL_SERVER_BY_FP ||
                conn->dir_spool_src == DIR_SPOOL_EXTRA_BY_FP);
   int extra = (conn->dir_spool_src == DIR_SPOOL_EXTRA_BY_FP ||
@@ -3512,9 +3509,6 @@ connection_dirserv_add_servers_to_outbuf(dir_connection_t *conn)
        * unknown bridge descriptor has shown up between then and now. */
       continue;
     }
-#ifdef TRACK_SERVED_TIME
-    sd->last_served_at = now;
-#endif
     body = signed_descriptor_get_body(sd);
     if (conn->zlib_state) {
       /* XXXX022 This 'last' business should actually happen on the last
index 6969a9cff780c725cc4ed9f0053525c301b3f3d2..7a901e7ae201929b9f677e432eac42a42e4d2ba3 100644 (file)
@@ -1690,11 +1690,6 @@ typedef struct signed_descriptor_t {
    * networkstatus that listed it.  0 for "never listed in a consensus or
    * status, so far as we know." */
   time_t last_listed_as_valid_until;
-#ifdef TRACK_SERVED_TIME
-  /** The last time we served anybody this descriptor.  Used for internal
-   * testing to see whether we're holding on to descriptors too long. */
-  time_t last_served_at; /*XXXX remove if not useful. */
-#endif
   /* If true, we do not ever try to save this object in the cache. */
   unsigned int do_not_cache : 1;
   /* If true, this item is meant to represent an extrainfo. */