summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-07-26 19:07:26 +0000
committerNick Mathewson <nickm@torproject.org>2006-07-26 19:07:26 +0000
commit4ff4577beb7b7aa286059a5070b23357fff48bf3 (patch)
tree87c11a323c91def209efc2d0eb79b768f8f2e804 /src/or/routerlist.c
parent18771e851fab7ec12051636eda1dad7e13b11095 (diff)
downloadtor-4ff4577beb7b7aa286059a5070b23357fff48bf3.tar.gz
tor-4ff4577beb7b7aa286059a5070b23357fff48bf3.zip
r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
Refactor connection_t into edge, or, dir, control, and base subtypes. This might save some RAM on busy exit servers, but really matters most in terms of correctness. svn:r6906
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 46cb160918..5eb804477d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1705,13 +1705,13 @@ router_add_to_routerlist(routerinfo_t *router, const char **msg,
/* mark-for-close connections using the old key, so we can
* make new ones with the new key.
*/
- connection_t *conn;
+ or_connection_t *conn;
while ((conn = connection_or_get_by_identity_digest(
old_router->cache_info.identity_digest))) {
log_info(LD_DIR,"Closing conn to router '%s'; there is now a named "
"router with that name.",
old_router->nickname);
- connection_mark_for_close(conn);
+ connection_mark_for_close(TO_CONN(conn));
}
routerlist_remove(routerlist, old_router, i--, 0);
} else if (old_router->is_named) {
@@ -3317,8 +3317,9 @@ list_pending_descriptor_downloads(digestmap_t *result)
if (conn->type == CONN_TYPE_DIR &&
conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC &&
!conn->marked_for_close) {
- if (!strcmpstart(conn->requested_resource, prefix))
- dir_split_resource_into_fingerprints(conn->requested_resource+p_len,
+ dir_connection_t *dir_conn = TO_DIR_CONN(conn);
+ if (!strcmpstart(dir_conn->requested_resource, prefix))
+ dir_split_resource_into_fingerprints(dir_conn->requested_resource+p_len,
tmp, NULL, 1, 0);
}
}