aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-07 22:41:00 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-07 22:41:00 +0000
commite79a578feca34e01d4d71fa5c824f84fe649993a (patch)
tree7ac5a35bff036d0e4b1695f7ac8615315cbd4923 /src/or/directory.c
parent09e66bbd14ed1f59cf5a79f179536b7f8be87487 (diff)
downloadtor-e79a578feca34e01d4d71fa5c824f84fe649993a.tar
tor-e79a578feca34e01d4d71fa5c824f84fe649993a.tar.gz
if the rend desc cache entry was fetched more than 15 mins ago,
then try to fetch a new one. but if the new fetch fails, use the old one. svn:r1540
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 1af6bf59d..6a9fb40f4 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -275,16 +275,18 @@ int connection_dir_process_inbuf(connection_t *conn) {
switch(status_code) {
case 200:
if(rend_cache_store(body, body_len) < 0) {
- log_fn(LOG_WARN,"Failed to store rendezvous descriptor. Abandoning stream.");
- /* alice's ap_stream is just going to have to time out. */
+ log_fn(LOG_WARN,"Failed to store rendezvous descriptor.");
+ /* alice's ap_stream will notice when connection_mark_for_close
+ * cleans it up */
} else {
/* success. notify pending connections about this. */
rend_client_desc_fetched(conn->rend_query, 1);
+ conn->purpose = DIR_PURPOSE_HAS_FETCHED_RENDDESC;
}
break;
case 404:
- /* not there. also notify pending connections. */
- rend_client_desc_fetched(conn->rend_query, 0);
+ /* not there. pending connections will be notified when
+ * connection_mark_for_close cleans it up. */
break;
case 400:
log_fn(LOG_WARN,"http status 400 (bad request). Dirserver didn't like our rendezvous query?");