Fix iotivity bug in usage of mutex
@@ -1164,9 +1164,6 @@ const CASecureEndpoint_t *GetCASecureEndpointData(const CAEndpoint_t* peer)
{
OIC_LOG_V(DEBUG, NET_SSL_TAG, "In %s", __func__);
- // TODO: Added as workaround, need to debug
- oc_mutex_unlock(g_sslContextMutex);
-
oc_mutex_lock(g_sslContextMutex);
if (NULL == g_caSslContext)
{
@@ -2657,9 +2654,6 @@ CAResult_t CAsslGenerateOwnerPsk(const CAEndpoint_t *endpoint,
VERIFY_NON_NULL_RET(provServerDeviceId, NET_SSL_TAG, "provId is NULL", CA_STATUS_INVALID_PARAM);
VERIFY_NON_NULL_RET(ownerPsk, NET_SSL_TAG, "ownerPSK is NULL", CA_STATUS_INVALID_PARAM);
- // TODO: Added as workaround, need to debug
- oc_mutex_unlock(g_sslContextMutex);
-
oc_mutex_lock(g_sslContextMutex);
if (NULL == g_caSslContext)
{
