PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
ac8f0c20 by Marijn Suijten at 2021-01-19T15:47:26+00: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>
- - - - -
1 changed file:
- src/modules/bluetooth/bluez5-util.c
Changes:
=====================================
src/modules/bluetooth/bluez5-util.c
=====================================
@@ -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;
}
View it on GitLab:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/ac8f0c2070d04fb2b4a53bc642129b026bf139a7
--
View it on GitLab:
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/ac8f0c2070d04fb2b4a53bc642129b026bf139a7
You're receiving this email because of your account on gitlab.freedesktop.org.
_______________________________________________
pulseaudio-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits