From: Nikos Mavrogiannopoulos Date: Sun, 23 May 2004 07:31:24 +0000 (+0000) Subject: _gnutls_deinit() is no longer used. Sessions are not X-Git-Tag: gnutls_1_1_11~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f13de256fb96dd4e820b7ad51bc54d536fa86367;p=thirdparty%2Fgnutls.git _gnutls_deinit() is no longer used. Sessions are not automatically removed any more, on abnormal termination. --- diff --git a/NEWS b/NEWS index faf43b262e..1739b4fcd6 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ Version 1.1.10 - Fixes in openpgp signature verification. - certtool has now support for more X.520 DN attribute types. - Better handling of EOF in gnutls_record_recv(). +- _gnutls_deinit() is no longer used. Sessions are not + automatically removed any more, on abnormal termination. Version 1.1.9 (14/04/2004) - Added support for authority key identifier and the extended key usage diff --git a/lib/gnutls.h.in.in b/lib/gnutls.h.in.in index 07be18d25f..c83067fc8e 100644 --- a/lib/gnutls.h.in.in +++ b/lib/gnutls.h.in.in @@ -197,7 +197,8 @@ typedef struct { int gnutls_init(gnutls_session * session, gnutls_connection_end con_end); void gnutls_deinit(gnutls_session session); -void _gnutls_deinit(gnutls_session session); +#define _gnutls_deinit(x) gnutls_deinit(x) + int gnutls_bye( gnutls_session session, gnutls_close_request how); int gnutls_handshake( gnutls_session session); diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index 8fe59a4bfb..fe51a46961 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -302,15 +302,15 @@ int _gnutls_session_is_resumable( gnutls_session session) /** - * _gnutls_deinit - This function clears all buffers associated with the &session + * gnutls_deinit - This function clears all buffers associated with the &session * @session: is a &gnutls_session structure. * * This function clears all buffers associated with the &session. - * The difference with gnutls_deinit() is that this function will not - * interfere with the session database. + * This function will also remove session data from the session database + * if the session was terminated abnormally. * **/ -void _gnutls_deinit(gnutls_session session) +void gnutls_deinit(gnutls_session session) { if (session==NULL) return; @@ -380,31 +380,6 @@ void _gnutls_deinit(gnutls_session session) gnutls_free(session); } -/** - * gnutls_deinit - This function clears all buffers associated with the &session - * @session: is a &gnutls_session structure. - * - * This function clears all buffers associated with the &session. - * This function will also remove session data from the session database - * if the session was terminated abnormally. - * - **/ -void gnutls_deinit(gnutls_session session) -{ - - if (session==NULL) return; - - /* If the session was terminated abnormally then remove - * the session data. - */ - if (_gnutls_session_is_resumable(session)==RESUME_FALSE) { - gnutls_db_remove_session( session); - } - - _gnutls_deinit( session); -} - - int _gnutls_dh_get_prime_bits( gnutls_session session) { return session->internals.dh_prime_bits;