From: injun.yang Date: Mon, 27 May 2019 06:21:42 +0000 (+0900) Subject: Cancel BLE connection attempt currently in progress X-Git-Tag: accepted/tizen/unified/20190611.050054^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b6fb2eadcdb68a267f4b2ddb9e2c65a673df8e6a;p=platform%2Fupstream%2Fbluez.git Cancel BLE connection attempt currently in progress [Model] All [BinType] AP [Customer] OPEN [Issue#] N/A [Request] Internal [Occurrence Version] N/A [Problem] Unable to abort BLE connection attempt [Cause & Measure] Abort connection attempt and send "Cancelled" event to upper side [Checking Method] Cancel BLE connection attempt [Team] IoT Hub [Developer] Injun Yang [Solution company] Samsung [Change Type] Specification change Change-Id: I8eb1edfa33a12a39ba6abc5f3838fc73e987d0ca Signed-off-by: injun.yang Signed-off-by: DoHyun Pyun --- diff --git a/src/device.c b/src/device.c index 5c8db72..aeb27ee 100644 --- a/src/device.c +++ b/src/device.c @@ -3663,15 +3663,9 @@ static DBusMessage *disconnect_le(DBusConnection *conn, DBusMessage *msg, g_dbus_send_reply(dbus_conn, msg, DBUS_TYPE_INVALID); return NULL; } - } else if (!dev->le_state.connected) { - return btd_error_not_connected(msg); } - dev->disconnects = g_slist_append(dev->disconnects, - dbus_message_ref(msg)); - - btd_adapter_disconnect_device(dev->adapter, &dev->bdaddr, - dev->bdaddr_type); + device_request_disconnect(dev, msg); return NULL; }