mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Remove dead code from rend_cache_lookup_v2_desc_as_dir
hid_serv_responsible_for_desc_id's return value is never negative, and there is no need to search through the consensus to find out whether we are responsible for a descriptor ID before we look in our cache for a descriptor.
This commit is contained in:
parent
151ab61442
commit
c90097e74a
5
changes/bug2748
Normal file
5
changes/bug2748
Normal file
@ -0,0 +1,5 @@
|
||||
o Minor bugfixes
|
||||
- Remove dead code from rend_cache_lookup_v2_desc_as_dir. Fixes
|
||||
part of bug 2748; bugfix on 0.2.0.10-alpha.
|
||||
|
||||
|
@ -1008,13 +1008,6 @@ rend_cache_lookup_v2_desc_as_dir(const char *desc_id, const char **desc)
|
||||
safe_str(desc_id));
|
||||
return -1;
|
||||
}
|
||||
/* Determine if we are responsible. */
|
||||
if (hid_serv_responsible_for_desc_id(desc_id_digest) < 0) {
|
||||
log_info(LD_REND, "Could not answer fetch request for v2 descriptor; "
|
||||
"either we are no hidden service directory, or we are "
|
||||
"not responsible for the requested ID.");
|
||||
return -1;
|
||||
}
|
||||
/* Lookup descriptor and return. */
|
||||
e = digestmap_get(rend_cache_v2_dir, desc_id_digest);
|
||||
if (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user