diff options
author | Roger Dingledine <arma@torproject.org> | 2008-10-02 07:32:13 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2008-10-02 07:32:13 +0000 |
commit | e7f5a07ff432d4db0caf2009d36766f4f448da32 (patch) | |
tree | e42fa5bc2495934be0851bf8f5196ac39453352a /src/or/directory.c | |
parent | e24b812a32cd3e9281670443e6a02952315b0234 (diff) | |
download | tor-e7f5a07ff432d4db0caf2009d36766f4f448da32.tar.gz tor-e7f5a07ff432d4db0caf2009d36766f4f448da32.zip |
Make rend_cache_store() use the same return error codes as its v2
equivalent: I got a lonely "Failed to fetch rendezvous descriptor."
in my log file, even when the connection worked.
svn:r17028
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 9dfc80942a..5bd85bab7c 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -1946,15 +1946,16 @@ connection_dir_client_reached_eof(dir_connection_t *conn) (int)body_len, status_code, escaped(reason)); switch (status_code) { case 200: - if (rend_cache_store(body, body_len, 0) < 0) { - log_warn(LD_REND,"Failed to fetch rendezvous descriptor."); + if (rend_cache_store(body, body_len, 0) < -1) { + log_warn(LD_REND,"Failed to parse rendezvous descriptor."); /* Any pending rendezvous attempts will notice when * connection_about_to_close_connection() * cleans this dir conn up. */ /* We could retry. But since v0 descriptors are going out of * style, it isn't worth the hassle. We'll do better in v2. */ } else { - /* success. notify pending connections about this. */ + /* Success, or at least there's a v2 descriptor already + * present. Notify pending connections about this. */ conn->_base.purpose = DIR_PURPOSE_HAS_FETCHED_RENDDESC; rend_client_desc_trynow(conn->rend_data->onion_address, -1); } |