remove unnecessary startScan logic.
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 31 Mar 2016 12:02:13 +0000 (21:02 +0900)
committerJon A. Cruz <jon@joncruz.org>
Thu, 7 Apr 2016 22:01:29 +0000 (22:01 +0000)
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 <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/7499
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
(cherry picked from commit 00c308854d882d4be3c35438b293b7b34ee850ef)
Reviewed-on: https://gerrit.iotivity.org/gerrit/7517
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c

index f463d38..2fb4989 100644 (file)
@@ -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");