[tor-commits] [tor/master] Add created timestamp to a rend cache failure entry

nickm at torproject.org nickm at torproject.org
Tue Aug 11 13:36:11 UTC 2015


commit 6e967235240dede017bbf0a696de62443fd2a7c3
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Wed Aug 5 13:48:12 2015 -0400

    Add created timestamp to a rend cache failure entry
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 src/or/rendcache.c |    1 +
 src/or/rendcache.h |    3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/or/rendcache.c b/src/or/rendcache.c
index 8f3ddf5..9be9e24 100644
--- a/src/or/rendcache.c
+++ b/src/or/rendcache.c
@@ -129,6 +129,7 @@ rend_cache_failure_intro_entry_new(rend_intro_point_failure_t failure)
 {
   rend_cache_failure_intro_t *entry = tor_malloc(sizeof(*entry));
   entry->failure_type = failure;
+  entry->created_ts = time(NULL);
   return entry;
 }
 
diff --git a/src/or/rendcache.h b/src/or/rendcache.h
index b214a48..98c0f95 100644
--- a/src/or/rendcache.h
+++ b/src/or/rendcache.h
@@ -34,6 +34,9 @@ typedef struct rend_cache_entry_t {
 
 /* Introduction point failure type. */
 typedef struct rend_cache_failure_intro_t {
+  /* When this intro point failure occured thus we allocated this object and
+   * cache it. */
+  time_t created_ts;
   rend_intro_point_failure_t failure_type;
 } rend_cache_failure_intro_t;
 





More information about the tor-commits mailing list