From: Adam Dickmeiss Date: Thu, 27 Sep 2001 12:09:18 +0000 (+0000) Subject: Function nmem_exit calls oid_exit (when reference is 0). X-Git-Tag: YAZ.1.8~41 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=aa5f63565232666005bef5c83f2d500d8ce9dfb4 Function nmem_exit calls oid_exit (when reference is 0). --- diff --git a/util/nmem.c b/util/nmem.c index 7e3fc1b..ceb8210 100644 --- a/util/nmem.c +++ b/util/nmem.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: nmem.c,v $ - * Revision 1.26 2001-07-19 19:51:42 adam + * Revision 1.27 2001-09-27 12:09:18 adam + * Function nmem_exit calls oid_exit (when reference is 0). + * + * Revision 1.26 2001/07/19 19:51:42 adam * Added typecasts to make C++ happy. * * Revision 1.25 2001/06/26 14:11:27 adam @@ -104,6 +107,7 @@ #include #include #include +#include #ifdef WIN32 #include #elif _REENTRANT @@ -465,6 +469,7 @@ void nmem_exit (void) { if (--nmem_init_flag == 0) { + oid_exit(); while (freelist) { struct nmem_block *fl = freelist; diff --git a/util/oid.c b/util/oid.c index 47fc423..d5c193d 100644 --- a/util/oid.c +++ b/util/oid.c @@ -3,7 +3,10 @@ * See the file LICENSE for details. * * $Log: oid.c,v $ - * Revision 1.47 2001-09-24 21:51:55 adam + * Revision 1.48 2001-09-27 12:09:18 adam + * Function nmem_exit calls oid_exit (when reference is 0). + * + * Revision 1.47 2001/09/24 21:51:55 adam * New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid * and yaz_z3950oid_to_str. * @@ -612,10 +615,13 @@ void oid_init (void) void oid_exit (void) { - oid_init_flag = 0; - nmem_mutex_destroy (&oid_mutex); - nmem_destroy (oid_nmem); - oid_nmem = 0; + if (oid_init_flag) + { + oid_init_flag = 0; + nmem_mutex_destroy (&oid_mutex); + nmem_destroy (oid_nmem); + oid_nmem = 0; + } } static struct oident *oid_getentbyoid_x(int *o) diff --git a/win/makefile b/win/makefile index 7aca592..1f60dfa 100644 --- a/win/makefile +++ b/win/makefile @@ -1,5 +1,5 @@ # makefile.mak - makefile for MS NMAKE -# $Id: makefile,v 1.25 2001-09-24 21:51:56 adam Exp $ +# $Id: makefile,v 1.26 2001-09-27 12:09:18 adam Exp $ # # Programmed by # HL: Heikki Levanto, Index Data @@ -23,7 +23,7 @@ ############### Parameters ########################################################### -DEBUG=0 # 0 for release, 1 for debug +DEBUG=1 # 0 for release, 1 for debug NEW_Z3950=1 # 0= use old asn files # 1= generate files from *.asn (needs tcl) @@ -709,7 +709,10 @@ $(PROTOH): $(GENERATED_C_FILES) $(GENERATED_H_FILES) ########################################################### # # $Log: makefile,v $ -# Revision 1.25 2001-09-24 21:51:56 adam +# Revision 1.26 2001-09-27 12:09:18 adam +# Function nmem_exit calls oid_exit (when reference is 0). +# +# Revision 1.25 2001/09/24 21:51:56 adam # New Z39.50 OID utilities: yaz_oidval_to_z3950oid, yaz_str_to_z3950oid # and yaz_z3950oid_to_str. # diff --git a/win/yaz.rc b/win/yaz.rc index 1d5c410..8966e0c 100644 --- a/win/yaz.rc +++ b/win/yaz.rc @@ -54,8 +54,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,7,0,8 - PRODUCTVERSION 1,7,0,8 + FILEVERSION 1,7,0,9 + PRODUCTVERSION 1,7,0,9 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -73,14 +73,14 @@ BEGIN VALUE "Comments", "Z39.50 C Library\0" VALUE "CompanyName", "Index Data\0" VALUE "FileDescription", "YAZ Toolkit\0" - VALUE "FileVersion", "1, 7, 0, 8\0" + VALUE "FileVersion", "1, 7, 0, 9\0" VALUE "InternalName", "YAZ\0" VALUE "LegalCopyright", "Copyright © 1996-2001 Index Data\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "yaz.rc\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "Index Data YAZ Toolkit\0" - VALUE "ProductVersion", "1, 7, 0, 8\0" + VALUE "ProductVersion", "1, 7, 0, 9\0" VALUE "SpecialBuild", "\0" END END