bluetooth: don't send unsolicted replies to the endpoint Release() call
authorTanu Kaskinen <tanuk@iki.fi>
Thu, 18 Jan 2018 20:27:54 +0000 (22:27 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 20 Jan 2018 22:17:17 +0000 (00:17 +0200)
commitdf79abe754a6df7cf84ec06139cf38147355850d
tree6bc56b76aa0bc41d7b571243527be935d96ef344
parent2563cd65bc4a9c60518383133ea06761c08e724b
bluetooth: don't send unsolicted replies to the endpoint Release() call

It was reported that PulseAudio causes error messages in syslog from
dbus-daemon:

Jan 14 04:51:32 gentoo dbus-daemon[2492]: [system] Rejected send message, 2 matched rules; type="error", sender=":1.15" (uid=1000 pid=2864 comm="/usr/bin/pulseaudio --start --log-target=syslog ") interface="(unset)" member="(unset)" error name="org.bluez.MediaEndpoint1.Error.NotImplemented" requested_reply="0" destination=":1.1" (uid=0 pid=2670 comm="/usr/libexec/bluetooth/bluetoothd ")

The default policy on the system bus is to not let any method call
replies through if they have not been requested, and apparently
bluetoothd doesn't want replies to the Release() call.

This also changes the reply type from error to normal reply. The "not
implemented" error didn't make sense to me. We don't do any cleanup in
the Release() handler, probably because there's nothing to do. If there
is some cleanup that we should do, then it's a serious bug not to do it.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104646
src/modules/bluetooth/bluez5-util.c