summaryrefslogtreecommitdiffstats
path: root/binding-bluetooth/bluez-client.c
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-05-16 05:03:57 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2017-05-16 05:03:57 +0000
commit1010598ea02c995e6332cc6164c159809a11c80d (patch)
tree8adc5cb6394489bd600b737d1cb12afb6eee935d /binding-bluetooth/bluez-client.c
parent182789661d5c4d4dbe1c35f1b4f174bfd14f4472 (diff)
parente8dd76c1c44567b917a7ff081d6ed80b8ef9f722 (diff)
Merge "binding: bluetooth: add support for avrcp metadata reporting"
Diffstat (limited to 'binding-bluetooth/bluez-client.c')
-rw-r--r--binding-bluetooth/bluez-client.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/binding-bluetooth/bluez-client.c b/binding-bluetooth/bluez-client.c
index 3b97fef..e70df91 100644
--- a/binding-bluetooth/bluez-client.c
+++ b/binding-bluetooth/bluez-client.c
@@ -594,6 +594,11 @@ static void on_object_removed (GDBusObjectManager *manager,
dbusObjecPath = g_dbus_object_get_object_path (object);
+ if ((37 != strlen(dbusObjecPath))
+ || (NULL == g_strrstr_len(dbusObjecPath, 19,ADAPTER_PATH"/dev"))) {
+ return;
+ }
+
if (NULL != bluez_RegisterCallback.device_removed)
{
bluez_RegisterCallback.device_removed(dbusObjecPath);
@@ -646,16 +651,12 @@ on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager,
#endif
//ObjectPath is /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx
- if ((37 != strlen(pObjecPath))
- || (NULL == g_strrstr_len(pObjecPath, 19,
- ADAPTER_PATH"/dev"))) {
- return;
- }
LOGD("%s\n",pObjecPath);
if( (0 == g_strcmp0(pInterface, DEVICE_INTERFACE)) ||
- (0 == g_strcmp0(pInterface, MEDIA_CONTROL1_INTERFACE))) {
+ (0 == g_strcmp0(pInterface, MEDIA_CONTROL1_INTERFACE)) ||
+ (0 == g_strcmp0(pInterface, MEDIA_PLAYER1_INTERFACE))) {
if (bluez_RegisterCallback.device_properties_changed)
bluez_RegisterCallback.device_properties_changed(pObjecPath,