mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth/bluez5-util: Do not reply to ClearConfiguration
Similar to the situation/comment in `endpoint_release` BlueZ does not
request any reply to `ClearConfiguration()` either; sending one results
in the same "0 matched rules" warning from dbus-daemon:
dbus-daemon[1309]: [system] Rejected send message, 0 matched rules; type="method_return", sender=":1.71" (uid=1000 pid=87548 comm="../build/src/daemon/pulseaudio -vvvv -n -F ../buil") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.3" (uid=0 pid=1308 comm="/usr/lib/bluetooth/bluetoothd -d ")
Solve this by only creating a return message when an (othwise empty)
reply is solicited for, just like in `endpoint_release`.
Unfortunately we also have to make sure to not send any error back if no
reply is requested, but fortunately an argument parsing error here is
extremely unlikely.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/472>
This commit is contained in:
parent
cdbb73f9ad
commit
ac8f0c2070
1 changed files with 5 additions and 3 deletions
|
|
@ -1909,7 +1909,7 @@ fail:
|
|||
static DBusMessage *endpoint_clear_configuration(DBusConnection *conn, DBusMessage *m, void *userdata) {
|
||||
pa_bluetooth_discovery *y = userdata;
|
||||
pa_bluetooth_transport *t;
|
||||
DBusMessage *r;
|
||||
DBusMessage *r = NULL;
|
||||
DBusError err;
|
||||
const char *path;
|
||||
|
||||
|
|
@ -1926,12 +1926,14 @@ static DBusMessage *endpoint_clear_configuration(DBusConnection *conn, DBusMessa
|
|||
pa_bluetooth_transport_free(t);
|
||||
}
|
||||
|
||||
pa_assert_se(r = dbus_message_new_method_return(m));
|
||||
if (!dbus_message_get_no_reply(m))
|
||||
pa_assert_se(r = dbus_message_new_method_return(m));
|
||||
|
||||
return r;
|
||||
|
||||
fail:
|
||||
pa_assert_se(r = dbus_message_new_error(m, "org.bluez.Error.InvalidArguments", "Unable to clear configuration"));
|
||||
if (!dbus_message_get_no_reply(m))
|
||||
pa_assert_se(r = dbus_message_new_error(m, "org.bluez.Error.InvalidArguments", "Unable to clear configuration"));
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue