From: Samanway Dey Date: Thu, 11 Jul 2019 12:25:01 +0000 (+0530) Subject: Mutex Unlock Corrected X-Git-Tag: accepted/tizen/unified/20190816.112424~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fiotivity.git;a=commitdiff_plain;h=aa5d98f86a00f9577259aa420de68fcedfbfcaac Mutex Unlock Corrected - For tizen BLE caleclient.c file, in function CALEAdapterScanResultCb(), g_LEServerListMutex was placed in a wrong nested block, as a result even if g_LEServerListMutex was not locked in some case, ittas being unlocked following crash in IoTivity stack. - Hence, corrected it https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/538/commits/4e49610943156f45e6b0e7c2a0a9783ba5c2b94b (cherry-picked from 4e49610943156f45e6b0e7c2a0a9783ba5c2b94b) Change-Id: I9d76583346029f46ef7ad7ded4c850ca1feb4b06 Signed-off-by: Samanway Dey Signed-off-by: Sudipto --- diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c b/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c index 084ea7d..df00ae1 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c @@ -532,12 +532,13 @@ void CALEAdapterScanResultCb(int result, bt_adapter_le_device_scan_result_info_s CADestroyLEDataList(&serverInfo->pendingDataList); oc_mutex_unlock(g_LEServerListMutex); return ; - } - } - } + } + } + } + oc_mutex_unlock(g_LEServerListMutex); } - oc_mutex_unlock(g_LEServerListMutex); + OIC_LOG(DEBUG, TAG, "OUT"); }