Update the CADtlsClose API to remove the DTLS peer when closing temporary DTLS session.
authorChul Lee <chuls.lee@samsung.com>
Tue, 27 Sep 2016 05:13:53 +0000 (14:13 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 30 Sep 2016 06:01:49 +0000 (06:01 +0000)
Change-Id: I3cd6e081ade3017ec417ee0b6de772278aefcf67
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12255
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c

index 571878e..b81153a 100644 (file)
@@ -789,6 +789,8 @@ CAResult_t CADtlsClose(const CAEndpoint_t *endpoint)
         return CA_STATUS_FAILED;
     }
 
+    CARemovePeerFromPeerInfoList(endpoint->addr, endpoint->port);
+
     ca_mutex_unlock(g_dtlsContextMutex);
 
     OIC_LOG(DEBUG, NET_DTLS_TAG, "OUT CADtlsDisconnect");