]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add created timestamp to a rend cache failure entry
authorDavid Goulet <dgoulet@ev0ke.net>
Wed, 5 Aug 2015 17:48:12 +0000 (13:48 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 11 Aug 2015 13:34:41 +0000 (09:34 -0400)
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
src/or/rendcache.c
src/or/rendcache.h

index 8f3ddf5585ae32e850ea464bcdc6d2df4d3e5d3e..9be9e249414970eae268be4e52274dfe7ad5bb3d 100644 (file)
@@ -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;
 }
 
index b214a48ccc87f6e202a596857df08923b8d31ce5..98c0f9526435c2ecc1d8196e0f443998832954b5 100644 (file)
@@ -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;