remove unnecessary startScan logic.
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 31 Mar 2016 12:02:13 +0000 (21:02 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 1 Apr 2016 06:52:44 +0000 (06:52 +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>
resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c

index f3cfe2f..633d66b 100644 (file)
@@ -4182,27 +4182,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");