summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/sink.c')
-rw-r--r--src/pulsecore/sink.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index ed68dd8e..667ae761 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -1605,8 +1605,12 @@ int pa_sink_suspend_all(pa_core *c, pa_bool_t suspend) {
pa_core_assert_ref(c);
- for (sink = PA_SINK(pa_idxset_first(c->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(c->sinks, &idx)))
- ret -= pa_sink_suspend(sink, suspend) < 0;
+ for (sink = PA_SINK(pa_idxset_first(c->sinks, &idx)); sink; sink = PA_SINK(pa_idxset_next(c->sinks, &idx))) {
+ int r;
+
+ if ((r = pa_sink_suspend(sink, suspend)) < 0)
+ ret = r;
+ }
return ret;
}