From f5ecbd6f0a3e5ff1d4d8655bf2066d54d1bcc7d9 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 2 Jun 2004 22:54:31 +0000 Subject: [PATCH] * gss_libinit.c (gssint_lib_init): Initialize error tables here. (gssint_initialize_library): Don't do it directly here. Make sure gssint_lib_init has been called, and return the status. (gssint_lib_fini): Remove error tables here. (gssint_cleanup_library): Function deleted. (initialized): Variable deleted. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16390 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/ChangeLog | 9 +++++++++ src/lib/gssapi/gss_libinit.c | 37 +++++++++--------------------------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/src/lib/gssapi/ChangeLog b/src/lib/gssapi/ChangeLog index f0d0b5782..f41c528f8 100644 --- a/src/lib/gssapi/ChangeLog +++ b/src/lib/gssapi/ChangeLog @@ -1,3 +1,12 @@ +2004-06-02 Ken Raeburn + + * gss_libinit.c (gssint_lib_init): Initialize error tables here. + (gssint_initialize_library): Don't do it directly here. Make sure + gssint_lib_init has been called, and return the status. + (gssint_lib_fini): Remove error tables here. + (gssint_cleanup_library): Function deleted. + (initialized): Variable deleted. + 2004-05-13 Ken Raeburn * libgssapi_krb5.exports: Remove et_*, generic_*, gssint_*, diff --git a/src/lib/gssapi/gss_libinit.c b/src/lib/gssapi/gss_libinit.c index fb80c8946..70301af73 100644 --- a/src/lib/gssapi/gss_libinit.c +++ b/src/lib/gssapi/gss_libinit.c @@ -7,8 +7,6 @@ #include "gss_libinit.h" #include "k5-platform.h" -static int initialized = 0; - /* * Initialize the GSSAPI library. */ @@ -18,6 +16,10 @@ MAKE_FINI_FUNCTION(gssint_lib_fini); int gssint_lib_init(void) { +#if !USE_BUNDLE_ERROR_STRINGS + add_error_table(&et_k5g_error_table); + add_error_table(&et_ggss_error_table); +#endif return k5_mutex_finish_init(&kg_vdb.mutex); } @@ -25,35 +27,14 @@ void gssint_lib_fini(void) { if (!INITIALIZER_RAN(gssint_lib_init) || PROGRAM_EXITING()) return; - k5_mutex_destroy(&kg_vdb.mutex); -} - -OM_uint32 gssint_initialize_library (void) -{ - if (!initialized) { #if !USE_BUNDLE_ERROR_STRINGS - add_error_table(&et_k5g_error_table); - add_error_table(&et_ggss_error_table); + remove_error_table(&et_k5g_error_table); + remove_error_table(&et_ggss_error_table); #endif - - initialized = 1; - } - - return CALL_INIT_FUNCTION(gssint_lib_init); + k5_mutex_destroy(&kg_vdb.mutex); } -/* - * Clean up the Kerberos v5 lirbary state - */ - -void gssint_cleanup_library (void) +OM_uint32 gssint_initialize_library (void) { - assert (initialized); - -#if !USE_BUNDLE_ERROR_STRINGS - remove_error_table(&et_k5g_error_table); - remove_error_table(&et_ggss_error_table); -#endif - - initialized = 0; + return CALL_INIT_FUNCTION(gssint_lib_init); } -- 2.26.2