aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-25 17:21:16 -0400
committerNick Mathewson <nickm@torproject.org>2011-03-25 18:32:28 -0400
commitd38030381b04263f76ce7f8ed2d6ceefc4ce363f (patch)
tree0dd112906caf0fcfb71dbcc29a5d0867b8b25a91 /src/or/connection_or.c
parent550749555cd57a1f82fe6c08e866ae14456ed439 (diff)
downloadtor-d38030381b04263f76ce7f8ed2d6ceefc4ce363f.tar
tor-d38030381b04263f76ce7f8ed2d6ceefc4ce363f.tar.gz
Clarify some documentation and comments wrt resetting OR token buckets
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index ff863fd55..4b932ec51 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -353,6 +353,9 @@ connection_or_digest_is_known_relay(const char *id_digest)
* per-conn limits that are big enough they'll never matter. But if it's
* not a known relay, first check if we set PerConnBwRate/Burst, then
* check if the consensus sets them, else default to 'big enough'.
+ *
+ * If <b>reset</b> is true, set the bucket to be full. Otherwise, just
+ * clip the bucket if it happens to be <em>too</em> full.
*/
static void
connection_or_update_token_buckets_helper(or_connection_t *conn, int reset,
@@ -392,7 +395,8 @@ connection_or_update_token_buckets_helper(or_connection_t *conn, int reset,
}
/** Either our set of relays or our per-conn rate limits have changed.
- * Go through all the OR connections and update their token buckets. */
+ * Go through all the OR connections and update their token buckets to make
+ * sure they don't exceed their maximum values. */
void
connection_or_update_token_buckets(smartlist_t *conns, or_options_t *options)
{