mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse-server: fix route profile numbering
Route profile numbers refer to profile ids, not indices.
This commit is contained in:
parent
7be7b258cb
commit
942ead7d90
1 changed files with 11 additions and 3 deletions
|
|
@ -3968,10 +3968,18 @@ static int fill_card_info(struct client *client, struct message *m,
|
||||||
TAG_INVALID);
|
TAG_INVALID);
|
||||||
|
|
||||||
for (i = 0; i < pi_n_profiles; i++) {
|
for (i = 0; i < pi_n_profiles; i++) {
|
||||||
uint32_t idx = pi->profiles[i];
|
uint32_t j;
|
||||||
|
const char *name = "off";
|
||||||
|
|
||||||
|
for (j = 0; j < n_profiles; ++j) {
|
||||||
|
if (profile_info[j].id == pi->profiles[i]) {
|
||||||
|
name = profile_info[j].name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
message_put(m,
|
message_put(m,
|
||||||
TAG_STRING, idx < n_profiles ?
|
TAG_STRING, name, /* profile name */
|
||||||
profile_info[idx].name : "off", /* profile name */
|
|
||||||
TAG_INVALID);
|
TAG_INVALID);
|
||||||
}
|
}
|
||||||
if (client->version >= 27) {
|
if (client->version >= 27) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue