diff options
Diffstat (limited to 'src/or/rendcache.c')
-rw-r--r-- | src/or/rendcache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/rendcache.c b/src/or/rendcache.c index 1c466414c1..0abfeb50ca 100644 --- a/src/or/rendcache.c +++ b/src/or/rendcache.c @@ -479,7 +479,7 @@ rend_cache_clean_v2_descs_as_dir(time_t now, size_t force_remove) * -ENOENT means that no entry in the cache was found. */ int rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e, - int service) + rend_cache_type_t cache) { int ret = 0; char key[REND_SERVICE_ID_LEN_BASE32 + 2]; /* <version><query>\0 */ @@ -502,7 +502,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e, case 2: /* Default is version 2. */ default: - if(service){ + if(cache == REND_CACHE_TYPE_SERVICE){ entry = strmap_get_lc(rend_cache_service, query); } else { tor_snprintf(key, sizeof(key), "%d%s", default_version, query); @@ -515,7 +515,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e, goto end; } /* Check descriptor is parsed only if lookup is from client cache */ - if(!service){ + if(cache == REND_CACHE_TYPE_CLIENT){ tor_assert(entry->parsed && entry->parsed->intro_nodes); } |