diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-02-09 00:56:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-02-09 00:56:53 -0500 |
commit | 076654ce8423d2b8ab7285b22c13d4002942bd8b (patch) | |
tree | 2e4eef960efa18ca461a8f846acd8f921746441a /src/or/connection.c | |
parent | 8e8c0674c4729a6aa39ded658e800baa654fe289 (diff) | |
download | tor-076654ce8423d2b8ab7285b22c13d4002942bd8b.tar.gz tor-076654ce8423d2b8ab7285b22c13d4002942bd8b.zip |
Replace magic constants for wide_circ_ids with inline function calls
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 2 insertions, 4 deletions
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) && |