If application try to send data when adapter is terminated,
Error message should be delivered to application layer.
Change-Id: Iec02116e864fb8667570c67982f44838d74f84a9
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14181
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
return;
}
+ if (caglobals.tcp.terminate)
+ {
+ OIC_LOG(DEBUG, TAG, "Adapter is not enabled");
+ CATCPErrorHandler(tcpData->remoteEndpoint, tcpData->data, tcpData->dataLen,
+ CA_SEND_FAILED);
+ return;
+ }
+
if (tcpData->isMulticast)
{
//Processing for sending multicast