summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-04-04 21:18:56 +0000
committerNick Mathewson <nickm@torproject.org>2008-04-04 21:18:56 +0000
commit85db675911d1b4bbba755266ebaa33404c40e5de (patch)
treef1f7f28f986e8e3afa8f7e709c6ccf7e045813f8 /src/or/dirserv.c
parent4c04b7f4f67ef1c31f6368167ad27930e983947a (diff)
downloadtor-85db675911d1b4bbba755266ebaa33404c40e5de.tar.gz
tor-85db675911d1b4bbba755266ebaa33404c40e5de.zip
r19202@catbus: nickm | 2008-04-04 17:18:47 -0400
Make last_served_at optional; make last_listed_as_valid_until take account (partially) of v2 statuses. svn:r14299
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index aa4d8b717e..63bc2b0e28 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -2939,7 +2939,9 @@ 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 ||
@@ -2967,7 +2969,9 @@ 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) {
int last = ! smartlist_len(conn->fingerprint_stack);