From: jihwan.seo Date: Wed, 15 Feb 2017 10:21:37 +0000 (+0900) Subject: fix timing issue for mutex access in ble X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87a2e136bf9a61424569b9472720b2e8dc22dff2;p=contrib%2Fiotivity.git fix timing issue for mutex access in ble Change-Id: I95917e8788bf3abce8c8cc143c5cf645286a5d5e Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/17733 Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai --- diff --git a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c index 596209d..7feee61 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/caleadapter.c @@ -2826,8 +2826,6 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback, } CAInitializeLEAdapter(); - CASetLEClientThreadPoolHandle(handle); - result = CAInitializeLEGattClient(); if (CA_STATUS_OK != result) { @@ -2835,6 +2833,8 @@ CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback, return CA_STATUS_FAILED; } + CASetLEClientThreadPoolHandle(handle); + CASetLEReqRespClientCallback(CALEAdapterClientReceivedData); CASetLEServerThreadPoolHandle(handle); result = CAInitializeLEGattServer(); diff --git a/resource/csdk/stack/src/ocstack.c b/resource/csdk/stack/src/ocstack.c index fe0ca73..9a55134 100644 --- a/resource/csdk/stack/src/ocstack.c +++ b/resource/csdk/stack/src/ocstack.c @@ -3590,6 +3590,7 @@ OCStackResult OCProcess() { if (stackState == OC_STACK_UNINITIALIZED) { + OIC_LOG(ERROR, TAG, "OCProcess has failed. ocstack is not initialized"); return OC_STACK_ERROR; } #ifdef WITH_PRESENCE