summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@gmail.com>2011-07-14 04:24:10 +0200
committerGeorge Kadianakis <desnacked@gmail.com>2011-07-14 04:24:10 +0200
commit86b20e0d8ac0cc87cf85e34666d6cd25a9657521 (patch)
tree01e9d97097024ffa5b37afe4689ae014167e6f3b /src
parent684aca7faffea93a8e3dcb2a582aa10797f71e7d (diff)
downloadtor-86b20e0d8ac0cc87cf85e34666d6cd25a9657521.tar.gz
tor-86b20e0d8ac0cc87cf85e34666d6cd25a9657521.zip
Reverting the accounting thing introduced in 5492de76 till I think how it should be done properly.
Diffstat (limited to 'src')
-rw-r--r--src/or/connection.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 5e8f95f522..04dba2b9b0 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -2080,8 +2080,6 @@ connection_is_rate_limited(connection_t *conn)
or_options_t *options = get_options();
if (conn->linked)
return 0; /* Internal connection */
- else if (connection_uses_transport(conn)) /* pluggable transport proxy */
- return 1;
else if (! options->CountPrivateBandwidth &&
(tor_addr_family(&conn->addr) == AF_UNSPEC || /* no address */
tor_addr_is_internal(&conn->addr, 0)))
@@ -4158,11 +4156,9 @@ int
connection_uses_transport(connection_t *conn)
{
const transport_t *transport=NULL;
- if (find_transport_by_bridge_addrport(&conn->addr,
- conn->port,&transport) == 0)
- return 1;
- else
- return 0;
+ find_transport_by_bridge_addrport(&conn->addr,
+ conn->port,&transport);
+ return transport ? 1 : 0;
}
/** Returns the global proxy type used by tor. */