Add created timestamp to a rend cache failure entry

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
David Goulet 2015-08-05 13:48:12 -04:00 committed by Nick Mathewson
parent c265621a52
commit 6e96723524
2 changed files with 4 additions and 0 deletions

View 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;
}

View 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;