From 1250b5d735129c3e04c45484f80f99cdb12f39a1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 22 Jan 2011 01:08:36 +0100 Subject: ratelimit: fix log levels of log suppression messages When logging a suppression message do so on the same log level as the suppressed messages. Cherry picked by Colin Guthrie from ec5a7857127a1b3b9c5517c4a70a9b2c8aab35ca with a couple of additional changes due to extra limiting in master that was not present in stable-queue. --- src/pulsecore/ratelimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pulsecore/ratelimit.c') diff --git a/src/pulsecore/ratelimit.c b/src/pulsecore/ratelimit.c index 844dd77d..a274d2cc 100644 --- a/src/pulsecore/ratelimit.c +++ b/src/pulsecore/ratelimit.c @@ -35,7 +35,7 @@ static pa_static_mutex mutex = PA_STATIC_MUTEX_INIT; /* Modelled after Linux' lib/ratelimit.c by Dave Young * , which is licensed GPLv2. */ -pa_bool_t pa_ratelimit_test(pa_ratelimit *r) { +pa_bool_t pa_ratelimit_test(pa_ratelimit *r, pa_log_level_t t) { pa_usec_t now; pa_mutex *m; @@ -52,7 +52,7 @@ pa_bool_t pa_ratelimit_test(pa_ratelimit *r) { r->begin + r->interval < now) { if (r->n_missed > 0) - pa_log_warn("%u events suppressed", r->n_missed); + pa_logl(t, "%u events suppressed", r->n_missed); r->begin = now; -- cgit