[pulseaudio-discuss] [RFC v0 08/15] bluetooth: BlueZ 5 interface rename to org.bluez.Media1
Mikel Astiz
mikel.astiz.oss at gmail.com
Wed Dec 19 04:58:27 PST 2012
From: Mikel Astiz <mikel.astiz at bmw-carit.de>
Use the new interface name if BlueZ 5 has been detected.
---
src/modules/bluetooth/bluetooth-util.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c
index 0d18c4d..f59d770 100644
--- a/src/modules/bluetooth/bluetooth-util.c
+++ b/src/modules/bluetooth/bluetooth-util.c
@@ -822,7 +822,7 @@ static void register_endpoint_reply(DBusPendingCall *pending, void *userdata) {
}
if (dbus_message_get_type(r) == DBUS_MESSAGE_TYPE_ERROR) {
- pa_log("org.bluez.Media.RegisterEndpoint() failed: %s: %s", dbus_message_get_error_name(r), pa_dbus_get_error_message(r));
+ pa_log("RegisterEndpoint() failed: %s: %s", dbus_message_get_error_name(r), pa_dbus_get_error_message(r));
goto finish;
}
@@ -839,10 +839,11 @@ static void register_endpoint(pa_bluetooth_discovery *y, const char *path, const
DBusMessage *m;
DBusMessageIter i, d;
uint8_t codec;
+ const char *interface = y->version == BLUEZ_VERSION_4 ? "org.bluez.Media" : "org.bluez.Media1";
pa_log_debug("Registering %s on adapter %s.", endpoint, path);
- pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, "org.bluez.Media", "RegisterEndpoint"));
+ pa_assert_se(m = dbus_message_new_method_call("org.bluez", path, interface, "RegisterEndpoint"));
dbus_message_iter_init_append(m, &i);
--
1.7.11.7
More information about the pulseaudio-discuss
mailing list