summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-01-11 12:24:36 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-01-11 12:24:36 +0000
commitdda9687b9379f8c5a60676ae116a5c43dfb890aa (patch)
treeadf96fb049cad19c839aee5da9da4649411e5bd2
parent1c49bd5de32e13466e7b03a00a3c6bcb56b939d8 (diff)
downloadgnutls-dda9687b9379f8c5a60676ae116a5c43dfb890aa.tar.gz
session gets deleted from the db if it is not resumablegnutls-0-0-7
-rw-r--r--lib/gnutls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gnutls.c b/lib/gnutls.c
index 1e48b1e6cb..47ad4babad 100644
--- a/lib/gnutls.c
+++ b/lib/gnutls.c
@@ -149,6 +149,10 @@ int gnutls_init(GNUTLS_STATE * state, ConnectionEnd con_end)
/* This function clears all buffers associated with the state. */
int gnutls_deinit(GNUTLS_STATE * state)
{
+ /* if the session has failed abnormally it has to be removed from the db */
+ if ( (*state)->gnutls_internals.resumable==RESUME_FALSE) {
+ _gnutls_db_remove_session( (*state), (*state)->security_parameters.session_id, (*state)->security_parameters.session_id_size);
+ }
gnutls_free((*state)->connection_state.read_compression_state);
gnutls_free((*state)->connection_state.read_mac_secret);
gnutls_free((*state)->connection_state.write_compression_state);