mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
protocol-native: Fix invalid assert
For source and sinks, we allow both the index and name to be invalid while introspecting (the default source/sink will be used). This modifies the assert appropriately. Thanks to Drew Ogle <dantealiegri@gmail.com> for reporting and providing a patch.
This commit is contained in:
parent
018de50cfd
commit
f69cbdbdf7
1 changed files with 3 additions and 1 deletions
|
|
@ -3390,7 +3390,9 @@ static void command_get_info(pa_pdispatch *pd, uint32_t command, uint32_t tag, p
|
|||
(command == PA_COMMAND_GET_SOURCE_INFO &&
|
||||
pa_namereg_is_valid_name_or_wildcard(name, PA_NAMEREG_SOURCE)) ||
|
||||
pa_namereg_is_valid_name(name), tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, idx != PA_INVALID_INDEX || name, tag, PA_ERR_INVALID);
|
||||
CHECK_VALIDITY(c->pstream, command == PA_COMMAND_GET_SINK_INFO ||
|
||||
command == PA_COMMAND_GET_SOURCE_INFO ||
|
||||
(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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue