mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
Fix suspending of all sinks/sources
pasuspender issues a SUSPEND_ALL requests for suspending all sinks/sources at once. This has been broken due to an ill-placed sanity checked.
This commit is contained in:
parent
d94d39d635
commit
aff72437a6
1 changed files with 5 additions and 1 deletions
|
|
@ -3968,7 +3968,7 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
|
|||
}
|
||||
|
||||
CHECK_VALIDITY(c->pstream, c->authorized, tag, PA_ERR_ACCESS);
|
||||
CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, !name || pa_namereg_is_valid_name(name) || *name == 0, tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, idx == PA_INVALID_INDEX || !name, tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, !name || idx == PA_INVALID_INDEX, tag, PA_ERR_INVALID);
|
||||
|
|
@ -3977,6 +3977,8 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
|
|||
|
||||
if (idx == PA_INVALID_INDEX && name && !*name) {
|
||||
|
||||
pa_log_debug("%s all sinks", b ? "Suspending" : "Resuming");
|
||||
|
||||
if (pa_sink_suspend_all(c->protocol->core, b) < 0) {
|
||||
pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID);
|
||||
return;
|
||||
|
|
@ -4002,6 +4004,8 @@ static void command_suspend(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
|
|||
|
||||
if (idx == PA_INVALID_INDEX && name && !*name) {
|
||||
|
||||
pa_log_debug("%s all sources", b ? "Suspending" : "Resuming");
|
||||
|
||||
if (pa_source_suspend_all(c->protocol->core, b) < 0) {
|
||||
pa_pstream_send_error(c->pstream, tag, PA_ERR_INVALID);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue