modified scan interval logic when BT adapter is on.
authorjihwan.seo <jihwan.seo@samsung.com>
Tue, 16 Aug 2016 04:12:39 +0000 (13:12 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 19 Aug 2016 10:33:59 +0000 (10:33 +0000)
when BT adapter is off -> on,
scan logic is not working
because condition variable was freed.

Change-Id: Ifa244c44d57d60fea84ab42f58b100ab3cf8d147
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10477
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 62b4fdc..3b434ea 100644 (file)
@@ -3984,6 +3984,11 @@ CAResult_t CAStartLEGattClient()
         g_threadWriteCharacteristicCond = ca_cond_new();
     }
 
+    if (!g_threadScanIntervalCond)
+    {
+        g_threadScanIntervalCond = ca_cond_new();
+    }
+
     CAResult_t ret = CALEClientStartScanWithInterval();
     if (CA_STATUS_OK != ret)
     {