diff options
author | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-09-01 21:19:01 +0200 |
---|---|---|
committer | Donncha O'Cearbhaill <donncha@donncha.is> | 2015-09-08 12:34:05 +0200 |
commit | d47a4aec666396acb10a2bfcd9797a9c6402c1fe (patch) | |
tree | ae8c8487b62565d29aa1aba5697955012c60d143 /src/or/rendcache.h | |
parent | 61ef356ab3ca1bbc4db725484293ebbc78710637 (diff) | |
download | tor-d47a4aec666396acb10a2bfcd9797a9c6402c1fe.tar.gz tor-d47a4aec666396acb10a2bfcd9797a9c6402c1fe.zip |
Separate lookup function for service rend cache
Performing lookups in both the client and service side descriptor
caches from the same rend_cache_lookup_entry() function increases the
risk of accidental API misuse.
I'm separating the lookup functions to keep the caches distinct.
Diffstat (limited to 'src/or/rendcache.h')
-rw-r--r-- | src/or/rendcache.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/rendcache.h b/src/or/rendcache.h index f04d0871ae..a5ad2da3b4 100644 --- a/src/or/rendcache.h +++ b/src/or/rendcache.h @@ -60,8 +60,9 @@ void rend_cache_clean_v2_descs_as_dir(time_t now, size_t min_to_remove); void rend_cache_purge(void); void rend_cache_free_all(void); int rend_cache_lookup_entry(const char *query, int version, - rend_cache_entry_t **entry_out, - rend_cache_type_t cache); + rend_cache_entry_t **entry_out); +int rend_cache_lookup_v2_desc_as_service(const char *query, + rend_cache_entry_t **entry_out); int rend_cache_lookup_v2_desc_as_dir(const char *query, const char **desc); /** Return value from rend_cache_store_v2_desc_as_{dir,client}. */ typedef enum { |