mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
dbus: fix card profile change signals
The "profile->card != c->card" check always evaluated to false, so the CardProfileUpdated signal was never sent. The reason: call_data was assigned to a pa_card_profile pointer, but the correct type is a pa_card pointer.
This commit is contained in:
parent
6022a1ee99
commit
0ced45265c
1 changed files with 8 additions and 8 deletions
|
|
@ -457,27 +457,27 @@ static void check_card_proplist(pa_dbusiface_card *c) {
|
|||
}
|
||||
|
||||
static pa_hook_result_t card_profile_changed_cb(void *hook_data, void *call_data, void *slot_data) {
|
||||
pa_dbusiface_card *c = slot_data;
|
||||
pa_card_profile *profile = call_data;
|
||||
pa_dbusiface_card *dbus_card = slot_data;
|
||||
pa_card *core_card = call_data;
|
||||
const char *object_path;
|
||||
DBusMessage *signal_msg;
|
||||
|
||||
if (profile->card != c->card)
|
||||
if (dbus_card->card != core_card)
|
||||
return PA_HOOK_OK;
|
||||
|
||||
c->active_profile = c->card->active_profile;
|
||||
dbus_card->active_profile = dbus_card->card->active_profile;
|
||||
|
||||
object_path = pa_dbusiface_card_profile_get_path(pa_hashmap_get(c->profiles, c->active_profile->name));
|
||||
object_path = pa_dbusiface_card_profile_get_path(pa_hashmap_get(dbus_card->profiles, dbus_card->active_profile->name));
|
||||
|
||||
pa_assert_se(signal_msg = dbus_message_new_signal(c->path,
|
||||
pa_assert_se(signal_msg = dbus_message_new_signal(dbus_card->path,
|
||||
PA_DBUSIFACE_CARD_INTERFACE,
|
||||
signals[SIGNAL_ACTIVE_PROFILE_UPDATED].name));
|
||||
pa_assert_se(dbus_message_append_args(signal_msg, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID));
|
||||
|
||||
pa_dbus_protocol_send_signal(c->dbus_protocol, signal_msg);
|
||||
pa_dbus_protocol_send_signal(dbus_card->dbus_protocol, signal_msg);
|
||||
dbus_message_unref(signal_msg);
|
||||
|
||||
check_card_proplist(c);
|
||||
check_card_proplist(dbus_card);
|
||||
|
||||
return PA_HOOK_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue