[IOT-1265] fix writeCharacteristic success signal logic
authorjihwan.seo <jihwan.seo@samsung.com>
Thu, 8 Sep 2016 05:31:30 +0000 (14:31 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Fri, 9 Sep 2016 07:22:07 +0000 (07:22 +0000)
Change-Id: Ib9a5b4ad18298fc2541fb128d964e2e634280cb2
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11539
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.c

index cbd5dbd..94d4f8a 100644 (file)
@@ -2236,6 +2236,8 @@ CAResult_t CALESetValueAndWriteCharacteristic(JNIEnv* env, jobject gatt)
     g_isSignalSetFlag = false;
     ca_mutex_unlock(g_threadWriteCharacteristicMutex);
 
+    CALEClientUpdateSendCnt(env);
+
     OIC_LOG(INFO, TAG, "writeCharacteristic success!!");
     return CA_STATUS_OK;
 }
@@ -4477,8 +4479,6 @@ Java_org_iotivity_ca_CaLeClientInterface_caLeGattCharacteristicWriteCallback(
         g_isSignalSetFlag = true;
         ca_cond_signal(g_threadWriteCharacteristicCond);
         ca_mutex_unlock(g_threadWriteCharacteristicMutex);
-
-        CALEClientUpdateSendCnt(env);
     }
 
     (*env)->ReleaseStringUTFChars(env, jni_address, address);