diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-06-18 11:30:01 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-06-18 11:30:01 -0400 |
commit | f18ee7fc7287e9d5f55c7c6c2007a8a1c2466a3e (patch) | |
tree | c946de86995f219151437d39703de4e0b67bc3d4 /src/or | |
parent | c8cb55659acca96530a1d7f54bb96cac84626e17 (diff) | |
parent | 8acf5255c20c667f32313ee672c85f6ae00a4f87 (diff) | |
download | tor-f18ee7fc7287e9d5f55c7c6c2007a8a1c2466a3e.tar.gz tor-f18ee7fc7287e9d5f55c7c6c2007a8a1c2466a3e.zip |
Merge remote-tracking branch 'dgoulet/bug16381_026_01-revert' into maint-0.2.6
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/rendcommon.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 5fdd13efce..6698f2feaf 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -1249,12 +1249,18 @@ rend_cache_store_v2_desc_as_client(const char *desc, /* Do we already have a newer descriptor? */ tor_snprintf(key, sizeof(key), "2%s", service_id); e = (rend_cache_entry_t*) strmap_get_lc(rend_cache, key); - if (e && e->parsed->timestamp >= parsed->timestamp) { - log_info(LD_REND, "We already have a new enough service descriptor for " + if (e && e->parsed->timestamp > parsed->timestamp) { + log_info(LD_REND, "We already have a newer service descriptor for " "service ID %s with the same desc ID and version.", safe_str_client(service_id)); goto okay; } + /* Do we already have this descriptor? */ + if (e && !strcmp(desc, e->desc)) { + log_info(LD_REND,"We already have this service descriptor %s.", + safe_str_client(service_id)); + goto okay; + } if (!e) { e = tor_malloc_zero(sizeof(rend_cache_entry_t)); strmap_set_lc(rend_cache, key, e); |