diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2012-11-16 18:24:34 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2012-12-19 12:31:47 +0200 |
commit | 0f44b1e820c1744bfb46d37e87b71d64109c4374 (patch) | |
tree | a2335b96d34d3e495d0228af2fc610572e81c6ab /src/pulsecore/protocol-native.c | |
parent | 28c49a12fc83b7487f367b4186de10ff29a23a2e (diff) |
Log the reason for every suspend/resume.
I was looking at a log that showed that a suspend happened (at
a strange time), but the log didn't tell me why the suspend was done.
This patch tries to make sure that that won't happen again.
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r-- | src/pulsecore/protocol-native.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index c39efc6f0..88808bf84 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -4552,6 +4552,9 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa CHECK_VALIDITY(c->pstream, sink, tag, PA_ERR_NOENTITY); + pa_log_debug("%s of sink %s requested by client %" PRIu32 ".", + b ? "Suspending" : "Resuming", sink->name, c->client->index); + if (pa_sink_suspend(sink, b, PA_SUSPEND_USER) < 0) { pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID); return; @@ -4580,6 +4583,9 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa CHECK_VALIDITY(c->pstream, source, tag, PA_ERR_NOENTITY); + pa_log_debug("%s of source %s requested by client %" PRIu32 ".", + b ? "Suspending" : "Resuming", source->name, c->client->index); + if (pa_source_suspend(source, b, PA_SUSPEND_USER) < 0) { pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID); return; |