From 7189f7f71e868d910da86b594e4e66e603547f06 Mon Sep 17 00:00:00 2001 From: "armansito@chromium.org" Date: Wed, 4 Jun 2014 22:28:05 +0000 Subject: device/bluetooth: Fix bug in the GattServiceChanged event is sent. This CL fixes a bug in which a BluetoothRemoteGattServiceChromeOS sent a BluetoothGattService::Observer::GattServiceChanged event even when the underlying D-Bus object that triggered the property change signal did not correspond to the instance in question. This is fixed by correctly checking that the object paths match. BUG=none R=keybuk@chromium.org Review URL: https://codereview.chromium.org/313013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274936 0039d316-1c4b-4281-b951-d872f2087c98 --- device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'device') diff --git a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc index f2ec861..e4b0ae2 100644 --- a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc +++ b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc @@ -194,6 +194,10 @@ void BluetoothRemoteGattServiceChromeOS::NotifyDescriptorValueChanged( void BluetoothRemoteGattServiceChromeOS::GattServicePropertyChanged( const dbus::ObjectPath& object_path, const std::string& property_name){ + if (object_path != object_path_) + return; + + VLOG(1) << "Service property changed: " << object_path.value(); NotifyServiceChanged(); } -- cgit v1.1