[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10175: If a directory authority is down, skip it when deciding wher (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10175: If a directory authority is down, skip it when deciding wher (in tor/trunk: . src/or)
- From: arma@xxxxxxxx
- Date: Sat, 12 May 2007 19:22:31 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 12 May 2007 19:22:44 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-05-12 19:22:27 -0400 (Sat, 12 May 2007)
New Revision: 10175
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/routerlist.c
Log:
If a directory authority is down, skip it when deciding where to get
networkstatus objects or descriptors. Otherwise we keep asking
every 10 seconds forever.
(adapted from r9880)
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-05-12 23:19:10 UTC (rev 10174)
+++ tor/trunk/ChangeLog 2007-05-12 23:22:27 UTC (rev 10175)
@@ -37,6 +37,11 @@
- Fix a bug in dirserv_remove_invalid() that would cause authorities
to corrupt memory under some really unlikely scenarios.
+ o Major bugfixes:
+ - If a directory authority is down, skip it when deciding where to get
+ networkstatus objects or descriptors. Otherwise we keep asking
+ every 10 seconds forever.
+
o Minor fixes (resource management):
- Count the number of open sockets separately from the number
of active connection_t objects. This will let us avoid underusing
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-05-12 23:19:10 UTC (rev 10174)
+++ tor/trunk/src/or/routerlist.c 2007-05-12 23:22:27 UTC (rev 10175)
@@ -4317,6 +4317,7 @@
n_download = 0;
SMARTLIST_FOREACH(networkstatus_list, networkstatus_t *, ns,
{
+ trusted_dir_server_t *ds;
smartlist_t *dl;
dl = downloadable[ns_sl_idx] = smartlist_create();
download_from[ns_sl_idx] = smartlist_create();
@@ -4330,13 +4331,13 @@
* we take this clause out. -RD */
continue;
}
- { /* XXX temporary hack so I can debug other stuff without bug 384
- * filling up my logs. */
- trusted_dir_server_t *ds;
- ds = router_get_trusteddirserver_by_digest(ns->identity_digest);
- if (ds && !ds->is_running)
- continue;
- }
+
+ /* Don't try dirservers that we think are down -- we might have
+ * just tried them and just marked them as down. */
+ ds = router_get_trusteddirserver_by_digest(ns->identity_digest);
+ if (ds && !ds->is_running)
+ continue;
+
SMARTLIST_FOREACH(ns->entries, routerstatus_t * , rs,
{
if (!rs->need_to_mirror)