return OC_STACK_INVALID_PARAM;
}
- OCStackResult result;
- auto cLock = OCPlatform_impl::Instance().csdkLock().lock();
-
- if (cLock)
- {
- std::lock_guard<std::recursive_mutex> lock(*cLock);
- result = SetDeviceIdSeed(seed, seedSize);
- }
- else
- {
- oclog() <<"Mutex not found";
- result = OC_STACK_ERROR;
- }
- return result;
+ return SetDeviceIdSeed(seed, seedSize);
}
int OCSecure::peerCertCallbackWrapper(void *ctx, const mbedtls_x509_crt *cert,
ret = context->callback(cert, depth);
}
- if (0 == depth)
- {
- delete context;
- }
-
return (OC_STACK_OK == ret)? 0 : 1;
}
if (OC_STACK_OK != result)
{
oclog() << "OCSetPeerCertCallback() Failed";
- return result;
}
+ return result;
}
auto cLock = OCPlatform_impl::Instance().csdkLock().lock();