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/control.c | |
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/control.c')
-rw-r--r-- | src/or/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index 2408793bd7..7d72342293 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1920,7 +1920,7 @@ getinfo_helper_dir(control_connection_t *control_conn, return -1; } - if (!rend_cache_lookup_entry(question, -1, &e, REND_CACHE_TYPE_CLIENT)) { + if (!rend_cache_lookup_entry(question, -1, &e)) { /* Descriptor found in cache */ *answer = tor_strdup(e->desc); } else { @@ -1936,7 +1936,7 @@ getinfo_helper_dir(control_connection_t *control_conn, return -1; } - if (!rend_cache_lookup_entry(question, -1, &e, REND_CACHE_TYPE_SERVICE)) { + if (!rend_cache_lookup_v2_desc_as_service(question, &e)) { /* Descriptor found in cache */ *answer = tor_strdup(e->desc); } else { |