Added routine krb5_finish_ets, to complement krb5_initialize_ets
authorRichard Basch <probe@mit.edu>
Sat, 15 Feb 1997 21:27:05 +0000 (21:27 +0000)
committerRichard Basch <probe@mit.edu>
Sat, 15 Feb 1997 21:27:05 +0000 (21:27 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9868 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/error_tables/ChangeLog
src/lib/krb5/error_tables/init_ets.c

index d55ba1c41456b7c05208dea2c49a436e16adf32b..328a237fe6561943ce38751e32cd83f83e7d6fb5 100644 (file)
@@ -1,3 +1,8 @@
+Sat Feb 15 15:41:58 1997  Richard Basch  <basch@lehman.com>
+
+       * init_ets.c (krb5_finish_ets):
+               New routine to cleanup krb5 error tables
+
 Thu Nov 21 11:55:16 EST 1996    Richard Basch   <basch@lehman.com>
 
         * Makefile.in: win32 build
index 9de65c5d3e42001be40dc404e4bad2516731bb11..2ad4fd8dfdab8f5c81fce2889aa3df4d30ecf0b8 100644 (file)
 
 #include "k5-int.h"
 
+static int et_init = 0;
+
 KRB5_DLLIMP void KRB5_CALLCONV
 krb5_init_ets (context)
      krb5_context context;
 {
-    static int initialized = 0;
+    if (et_init) return;
+    et_init++;
 
-    if (initialized)
-           return;
-    
-    initialized++;
     initialize_krb5_error_table();
     initialize_kv5m_error_table();
     initialize_kdb5_error_table();
     initialize_asn1_error_table();
 }
+
+KRB5_DLLIMP void KRB5_CALLCONV
+krb5_finish_ets (context)
+    krb5_context context;
+{
+    if (! et_init) return;
+    et_init--;
+
+    cleanup_krb5_error_table();
+    cleanup_kv5m_error_table();
+    cleanup_kdb5_error_table();
+    cleanup_asn1_error_table();
+}