From 076654ce8423d2b8ab7285b22c13d4002942bd8b Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Sat, 9 Feb 2013 00:56:53 -0500 Subject: Replace magic constants for wide_circ_ids with inline function calls --- src/or/connection.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/or/connection.c') diff --git a/src/or/connection.c b/src/or/connection.c index b89e03cd91..cd81970b5f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2166,8 +2166,7 @@ connection_bucket_read_limit(connection_t *conn, time_t now) or_connection_t *or_conn = TO_OR_CONN(conn); if (conn->state == OR_CONN_STATE_OPEN) conn_bucket = or_conn->read_bucket; - base = or_conn->wide_circ_ids ? CELL_MAX_NETWORK_SIZE : - CELL_MAX_NETWORK_SIZE - 2; + base = get_cell_network_size(or_conn->wide_circ_ids); } if (!connection_is_rate_limited(conn)) { @@ -2205,8 +2204,7 @@ connection_bucket_write_limit(connection_t *conn, time_t now) if (or_conn->write_bucket < conn_bucket) conn_bucket = or_conn->write_bucket >= 0 ? or_conn->write_bucket : 0; - base = or_conn->wide_circ_ids ? CELL_MAX_NETWORK_SIZE : - CELL_MAX_NETWORK_SIZE - 2; + base = get_cell_network_size(or_conn->wide_circ_ids); } if (connection_counts_as_relayed_traffic(conn, now) && -- cgit v1.2.3-54-g00ecf