mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: Fix sending D-Bus reply before internal callback
Make sure the reply to SetConfiguration() is sent before the internal hook is fired. This is important because the hook could have side effects including D-Bus interfactions (i.e. transport Acquire() being called during module startup).
This commit is contained in:
parent
132814f114
commit
80406eba43
1 changed files with 3 additions and 1 deletions
|
|
@ -1356,11 +1356,13 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
|
||||||
pa_log_debug("Transport %s profile %d available", t->path, t->profile);
|
pa_log_debug("Transport %s profile %d available", t->path, t->profile);
|
||||||
|
|
||||||
pa_assert_se(r = dbus_message_new_method_return(m));
|
pa_assert_se(r = dbus_message_new_method_return(m));
|
||||||
|
pa_assert_se(dbus_connection_send(pa_dbus_connection_get(y->connection), r, NULL));
|
||||||
|
dbus_message_unref(r);
|
||||||
|
|
||||||
if (old_any_connected != pa_bluetooth_device_any_audio_connected(d))
|
if (old_any_connected != pa_bluetooth_device_any_audio_connected(d))
|
||||||
run_callback(d, false);
|
run_callback(d, false);
|
||||||
|
|
||||||
return r;
|
return NULL;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
pa_log("org.bluez.MediaEndpoint.SetConfiguration: invalid arguments");
|
pa_log("org.bluez.MediaEndpoint.SetConfiguration: invalid arguments");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue