pulse-server: name and id can't be both set in volume/mute

This commit is contained in:
Wim Taymans 2020-12-05 13:27:42 +01:00
parent 0fba936b06
commit 8c4145291e

View file

@ -2788,7 +2788,8 @@ static int do_set_volume(struct client *client, uint32_t command, uint32_t tag,
pw_log_info(NAME" %p: [%s] %s tag:%u index:%u name:%s", impl, pw_log_info(NAME" %p: [%s] %s tag:%u index:%u name:%s", impl,
client->name, commands[command].name, tag, id, name); client->name, commands[command].name, tag, id, name);
if (id == SPA_ID_INVALID && name == NULL) if ((id == SPA_ID_INVALID && name == NULL) ||
(id != SPA_ID_INVALID && name != NULL))
return -EINVAL; return -EINVAL;
if (command == COMMAND_SET_SINK_VOLUME) if (command == COMMAND_SET_SINK_VOLUME)
@ -2847,7 +2848,8 @@ static int do_set_mute(struct client *client, uint32_t command, uint32_t tag, st
pw_log_info(NAME" %p: [%s] %s tag:%u index:%u name:%s mute:%d", impl, pw_log_info(NAME" %p: [%s] %s tag:%u index:%u name:%s mute:%d", impl,
client->name, commands[command].name, tag, id, name, mute); client->name, commands[command].name, tag, id, name, mute);
if (id == SPA_ID_INVALID && name == NULL) if ((id == SPA_ID_INVALID && name == NULL) ||
(id != SPA_ID_INVALID && name != NULL))
return -EINVAL; return -EINVAL;
if (command == COMMAND_SET_SINK_MUTE) if (command == COMMAND_SET_SINK_MUTE)