summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-05-15 12:46:26 -0400
committerNick Mathewson <nickm@torproject.org>2011-05-15 20:13:44 -0400
commit2b9c5ee301f705cbf69c725ca749d4ac752c06d3 (patch)
treec46ee28c4f21ce5810c70ac7ff85ca3778c284f9 /src/or/circuitbuild.h
parentbc44393eb59a1d303314b4b646b4d815f4eadc22 (diff)
downloadtor-2b9c5ee301f705cbf69c725ca749d4ac752c06d3.tar.gz
tor-2b9c5ee301f705cbf69c725ca749d4ac752c06d3.zip
Preserve bridge download status across SETCONF, HUP
This code changes it so that we don't remove bridges immediately when we start re-parsing our configuration. Instead, we mark them all, and remove all the marked ones after re-parsing our bridge lines. As we add a bridge, we see if it's already in the list. If so, we just unmark it. This new behavior will lose the property we used to have that bridges were in bridge_list in the same order in which they appeared in the torrc. I took a quick look through the code, and I'm pretty sure we didn't actually depend on that anywhere. This is for bug 3019; it's a fix on 0.2.0.3-alpha.
Diffstat (limited to 'src/or/circuitbuild.h')
-rw-r--r--src/or/circuitbuild.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/circuitbuild.h b/src/or/circuitbuild.h
index af24931878..0e673e1c05 100644
--- a/src/or/circuitbuild.h
+++ b/src/or/circuitbuild.h
@@ -62,12 +62,13 @@ int getinfo_helper_entry_guards(control_connection_t *conn,
const char *question, char **answer,
const char **errmsg);
-void clear_bridge_list(void);
+void mark_bridge_list(void);
+void sweep_bridge_list(void);
int routerinfo_is_a_configured_bridge(routerinfo_t *ri);
-void
-learned_router_identity(tor_addr_t *addr, uint16_t port, const char *digest);
+void learned_router_identity(const tor_addr_t *addr, uint16_t port,
+ const char *digest);
void bridge_add_from_config(const tor_addr_t *addr, uint16_t port,
- char *digest);
+ const char *digest);
void retry_bridge_descriptor_fetch_directly(const char *digest);
void fetch_bridge_descriptors(or_options_t *options, time_t now);
void learned_bridge_descriptor(routerinfo_t *ri, int from_cache);