[Bluetooth] - fixing Ble disconnect function
authorAndrzej Popowski <a.popowski@samsung.com>
Fri, 7 Aug 2015 10:00:55 +0000 (12:00 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Fri, 7 Aug 2015 10:04:31 +0000 (19:04 +0900)
Change-Id: I717d3f448f4d57bb7fdc7e1f2c28042db4150e8d
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/bluetooth/bluetooth_le_device.cc

index 991cbfd..3dd2976 100755 (executable)
@@ -329,8 +329,11 @@ void BluetoothLEDevice::Disconnect(const picojson::value& data,
   const auto& args = util::GetArguments(data);
   const auto& address = common::FromJson<std::string>(args, "address");
 
+  int ret = BT_ERROR_NONE;
+
+/* TODO uncomment when bt_device_is_profile_connected will be fixed
   bool connected = false;
-  int ret = bt_device_is_profile_connected(address.c_str(), BT_PROFILE_GATT, &connected);
+  ret = bt_device_is_profile_connected(address.c_str(), BT_PROFILE_GATT, &connected);
   if (BT_ERROR_NONE != ret) {
     instance_.AsyncResponse(
         callback_handle,
@@ -343,6 +346,7 @@ void BluetoothLEDevice::Disconnect(const picojson::value& data,
                 &out);
     return;
   }
+*/
 
   ret = bt_gatt_disconnect(address.c_str());
   if (BT_ERROR_NONE != ret) {