diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-26 19:07:26 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-26 19:07:26 +0000 |
commit | 4ff4577beb7b7aa286059a5070b23357fff48bf3 (patch) | |
tree | 87c11a323c91def209efc2d0eb79b768f8f2e804 /src/or/hibernate.c | |
parent | 18771e851fab7ec12051636eda1dad7e13b11095 (diff) | |
download | tor-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/hibernate.c')
-rw-r--r-- | src/or/hibernate.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 5f1131da71..a1aca0327a 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -786,11 +786,12 @@ hibernate_go_dormant(time_t now) (conn = connection_get_by_type(CONN_TYPE_AP)) || (conn = connection_get_by_type(CONN_TYPE_EXIT))) { if (CONN_IS_EDGE(conn)) - connection_edge_end(conn, END_STREAM_REASON_HIBERNATING, - conn->cpath_layer); + connection_edge_end(TO_EDGE_CONN(conn), END_STREAM_REASON_HIBERNATING, + TO_EDGE_CONN(conn)->cpath_layer); log_info(LD_NET,"Closing conn type %d", conn->type); if (conn->type == CONN_TYPE_AP) /* send socks failure if needed */ - connection_mark_unattached_ap(conn, END_STREAM_REASON_HIBERNATING); + connection_mark_unattached_ap(TO_EDGE_CONN(conn), + END_STREAM_REASON_HIBERNATING); else connection_mark_for_close(conn); } |