From: jihwan.seo Date: Thu, 31 Mar 2016 12:02:13 +0000 (+0900) Subject: remove unnecessary startScan logic. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fdb826256827d120f9406427030cad13af35977;p=contrib%2Fiotivity.git 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 --- 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");