From 3fdb826256827d120f9406427030cad13af35977 Mon Sep 17 00:00:00 2001 From: "jihwan.seo" Date: Thu, 31 Mar 2016 21:02:13 +0900 Subject: [PATCH] remove unnecessary startScan logic. it doesn't need to scan when disconnected LE anymore. since scenario was changed for support manual disconnect API. Change-Id: I9fb36953d0dc209f7c7dda5c8ad2a3a05b61f0cb Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/7499 Tested-by: jenkins-iotivity Reviewed-by: Ashok Babu Channa (cherry picked from commit 00c308854d882d4be3c35438b293b7b34ee850ef) Reviewed-on: https://gerrit.iotivity.org/gerrit/7517 Reviewed-by: Jon A. Cruz --- .../src/bt_le_adapter/android/caleclient.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c index f463d38..2fb4989 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c @@ -4089,27 +4089,7 @@ Java_org_iotivity_ca_CaLeClientInterface_caLeGattConnectionStateChangeCallback(J OIC_LOG(ERROR, TAG, "CALEClientGattClose has failed"); } - if (gatt_success == status) - { - // that state is a general reason to disconnect BLE. - // its means manual disconnected message from BT platform. - // in this case Scanning has to start again and clean previous data. - CAResult_t res = CALEClientStartScan(); - if (CA_STATUS_OK != res) - { - if (CA_ADAPTER_NOT_ENABLED == res) - { - // scan will be started with start server when adapter is enabled - OIC_LOG(INFO, TAG, "Adapter was disabled"); - } - else - { - OIC_LOG(ERROR, TAG, "CALEClientStartScan has failed"); - goto error_exit; - } - } - } - else if (GATT_ERROR == status) + if (GATT_ERROR == status) { // when we get GATT ERROR(0x85), gatt connection can be called again. OIC_LOG(INFO, TAG, "retry gatt connect"); -- 2.7.4