From: Andrii Shtompel Date: Mon, 19 Sep 2016 16:12:44 +0000 (+0900) Subject: Close tls session with tcp session X-Git-Tag: 1.2.0+RC3~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=27cec1f345003807cf719fe69c46660b5363b527;p=platform%2Fupstream%2Fiotivity.git Close tls session with tcp session [Patch #2] Move it before socket close Change-Id: I5bede5ab75b4e67faff932e77c30565062916c95 Signed-off-by: Andrii Shtompel Reviewed-on: https://gerrit.iotivity.org/gerrit/12039 Tested-by: jenkins-iotivity Reviewed-by: Dmitriy Zhuravlev Reviewed-by: Randeep Singh --- diff --git a/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c b/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c index c3034e0..e6f99b2 100644 --- a/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c +++ b/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c @@ -1145,6 +1145,10 @@ CAResult_t CADisconnectTCPSession(CATCPSessionInfo_t *svritem, size_t index) ca_mutex_lock(g_mutexObjectList); +#ifdef __WITH_TLS__ + CAcloseTlsConnection(&svritem->sep.endpoint); +#endif + // close the socket and remove TCP connection info in list if (svritem->fd >= 0) {