Browse Source

Add created timestamp to a rend cache failure entry

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
David Goulet 8 years ago
parent
commit
6e96723524
2 changed files with 4 additions and 0 deletions
  1. 1 0
      src/or/rendcache.c
  2. 3 0
      src/or/rendcache.h

+ 1 - 0
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;
 }
 

+ 3 - 0
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;