OIC_LOG_BUFFER(DEBUG, TAG, data, dataLength);
ssize_t ret = CATCPSendData(endpoint, data, dataLength);
- if (-1 == ret)
- {
- CASearchAndDeleteTCPSession(endpoint);
- CATCPErrorHandler(endpoint, data, dataLength, CA_SEND_FAILED);
- }
OIC_LOG_V(DEBUG, TAG, "Out %s : %d bytes sent", __func__, ret);
return ret;
}
if (CA_STATUS_OK != result)
{
OIC_LOG(ERROR, TAG, "CAAdapterNetDtlsEncrypt failed!");
+ CASearchAndDeleteTCPSession(tcpData->remoteEndpoint);
+ CATCPErrorHandler(tcpData->remoteEndpoint, tcpData->data, tcpData->dataLen,
+ CA_SEND_FAILED);
}
OIC_LOG_V(DEBUG, TAG,
"CAAdapterNetDtlsEncrypt returned with result[%d]", result);
ssize_t dlen = CATCPSendData(tcpData->remoteEndpoint, tcpData->data, tcpData->dataLen);
if (-1 == dlen)
{
+ OIC_LOG(ERROR, TAG, "CATCPSendData failed");
CASearchAndDeleteTCPSession(tcpData->remoteEndpoint);
CATCPErrorHandler(tcpData->remoteEndpoint, tcpData->data, tcpData->dataLen,
CA_SEND_FAILED);