* gss_libinit.c (gssint_lib_init): Initialize error tables here.
authorKen Raeburn <raeburn@mit.edu>
Wed, 2 Jun 2004 22:54:31 +0000 (22:54 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 2 Jun 2004 22:54:31 +0000 (22:54 +0000)
(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
src/lib/gssapi/gss_libinit.c

index f0d0b5782b75f93bd3d9fc212aa5feaaf4a8c00a..f41c528f8bd0ed634f904e5d877babce727d3d05 100644 (file)
@@ -1,3 +1,12 @@
+2004-06-02  Ken Raeburn  <raeburn@mit.edu>
+
+       * 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  <raeburn@mit.edu>
 
        * libgssapi_krb5.exports: Remove et_*, generic_*, gssint_*,
index fb80c894636ade85d7fcc20754a102f13f91a36d..70301af73fceab040d43348cf0caa6364af54e80 100644 (file)
@@ -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);
 }