49 return tor_strdup(
"");
52 const char *opt_over = (n >= RATELIM_TOOMANY) ?
"over " :
"";
53 unsigned difference = (unsigned)(now - started_limiting);
56 " [%s%d similar message(s) suppressed in last %d seconds]",
57 opt_over, n-1, (
int)difference);
Headers for util_malloc.c.
unsigned round_to_next_multiple_of(unsigned number, unsigned divisor)
int tor_asprintf(char **strp, const char *fmt,...)
char * rate_limit_log(ratelim_t *lim, time_t now)
static int rate_limit_is_ready(ratelim_t *lim, time_t now)
Summarize similar messages that would otherwise flood the logs.
int n_calls_since_last_time