aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-06-16 11:54:50 -0400
committerNick Mathewson <nickm@torproject.org>2016-06-16 11:54:50 -0400
commit5c596cdbc086698c52824a4cc9f93753f7d7a24b (patch)
tree72044cbcde3c506b1138355fd487066aef5f745a /src/common/util.c
parent9b0bd65f220854b7335acca020c73dc075b379a3 (diff)
downloadtor-5c596cdbc086698c52824a4cc9f93753f7d7a24b.tar.gz
tor-5c596cdbc086698c52824a4cc9f93753f7d7a24b.zip
Tests for message rate-limiting
Also note a bug in the rate-limiting message.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c
index 0589cec8e6..2775dae8e6 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1921,6 +1921,8 @@ rate_limit_log(ratelim_t *lim, time_t now)
return tor_strdup("");
} else {
char *cp=NULL;
+ /* XXXX this is not exactly correct: the messages could have occurred
+ * any time between the old value of lim->allowed and now. */
tor_asprintf(&cp,
" [%d similar message(s) suppressed in last %d seconds]",
n-1, lim->rate);