diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-06-16 11:54:50 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-06-16 11:54:50 -0400 |
commit | 5c596cdbc086698c52824a4cc9f93753f7d7a24b (patch) | |
tree | 72044cbcde3c506b1138355fd487066aef5f745a /src/common/util.c | |
parent | 9b0bd65f220854b7335acca020c73dc075b379a3 (diff) | |
download | tor-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.c | 2 |
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); |