static bool CAClearQueueEndpointDataContext(void *data, uint32_t size, void *ctx)
{
+ (void)size;
+
if (NULL == data || NULL == ctx)
{
return false;
CAResult_t CATCPDisconnectSession(const CAEndpoint_t *endpoint)
{
- CAResult_t res = CA_STATUS_OK;
+ CAResult_t res = CAQueueingThreadClearContextData(g_sendQueueHandle,
+ CAClearQueueEndpointDataContext,
+ endpoint);
+ if (CA_STATUS_OK != res)
+ {
+ OIC_LOG(ERROR, TAG, "failed to clear context data");
+ }
+
#ifdef __WITH_TLS__
res = CAcloseSslConnection(endpoint);
if (CA_STATUS_OK != res)
{
OIC_LOG(ERROR, TAG, "failed to close TLS session");
- res = CAQueueingThreadClearContextData(g_sendQueueHandle,
- CAClearQueueEndpointDataContext,
- endpoint);
- if (CA_STATUS_OK != res)
- {
- OIC_LOG(ERROR, TAG, "failed to clear context data");
- }
-
- return res;
}
#endif
OIC_LOG(ERROR, TAG, "failed to close TCP session");
}
- res = CAQueueingThreadClearContextData(g_sendQueueHandle,
- CAClearQueueEndpointDataContext,
- endpoint);
- if (CA_STATUS_OK != res)
- {
- OIC_LOG(ERROR, TAG, "failed to clear context data");
- }
-
return res;
}