session: free session after transport and app confirm
In addition to that, a bit of refactoring.
Change-Id: Iea1eabc2167bcdef185ec53bc09bae087c5398e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/tls/tls.c b/src/vnet/tls/tls.c
index 0fdd68c..fdba08c 100644
--- a/src/vnet/tls/tls.c
+++ b/src/vnet/tls/tls.c
@@ -390,7 +390,7 @@
ctx = tls_ctx_get (tls_session->opaque);
if (!tls_ctx_handshake_is_over (ctx))
{
- stream_session_disconnect (tls_session);
+ session_close (tls_session);
return;
}
ctx->is_passive_close = 1;
@@ -568,7 +568,7 @@
ctx = tls_ctx_get (ctx_handle);
tls_disconnect_transport (ctx);
- stream_session_delete_notify (&ctx->connection);
+ session_transport_delete_notify (&ctx->connection);
tls_ctx_free (ctx);
}