[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix logic error (people who ask authorities should never sp...
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv14168/src/or
Modified Files:
main.c routerlist.c
Log Message:
Fix logic error (people who ask authorities should never split; others should always split). Also, fix timing error in main.c so retries really happen.
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/main.c,v
retrieving revision 1.557
retrieving revision 1.558
diff -u -d -r1.557 -r1.558
--- main.c 23 Sep 2005 18:05:14 -0000 1.557
+++ main.c 23 Sep 2005 18:17:37 -0000 1.558
@@ -664,7 +664,7 @@
if (time_to_reset_descriptor_failures < now) {
router_reset_descriptor_download_failures();
- time_to_try_getting_descriptors = now + DESCRIPTOR_FAILURE_RESET_INTERVAL;
+ time_to_reset_descriptor_failures = now + DESCRIPTOR_FAILURE_RESET_INTERVAL;
}
/** 1b. Every MAX_SSL_KEY_LIFETIME seconds, we change our TLS context. */
Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -d -r1.312 -r1.313
--- routerlist.c 23 Sep 2005 18:08:31 -0000 1.312
+++ routerlist.c 23 Sep 2005 18:17:37 -0000 1.313
@@ -2368,10 +2368,12 @@
rs->should_download = 1;
++n_downloadable;
} else {
+ /*
char fp[HEX_DIGEST_LEN+1];
base16_encode(fp, HEX_DIGEST_LEN+1, rs->status.identity_digest, DIGEST_LEN);
log_fn(LOG_NOTICE, "Not yet ready to download %s (%d more seconds)", fp,
(int)(rs->next_attempt_at-now));
+ */
rs->should_download = 0;
}
});
@@ -2479,7 +2481,7 @@
#define MIN_REQUESTS 3
smartlist_t *downloadable = NULL;
int get_all = 0;
- int always_split = server_mode(get_options()) && get_options()->DirPort;
+ int always_split = !server_mode(get_options()) || !get_options()->DirPort;
if (!networkstatus_list || smartlist_len(networkstatus_list)<2)
get_all = 1;