You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2004/07/23 16:35:03 UTC

cvs commit: xml-xerces/c/src/xercesc/util/Transcoders/IconvGNU IconvGNUTransService.cpp

amassari    2004/07/23 07:35:03

  Modified:    c/src/xercesc/util/Transcoders/IconvGNU
                        IconvGNUTransService.cpp
  Log:
  A global mutex was not cleaned up
  
  Revision  Changes    Path
  1.13      +12 -0     xml-xerces/c/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
  
  Index: IconvGNUTransService.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- IconvGNUTransService.cpp	25 Feb 2004 14:53:24 -0000	1.12
  +++ IconvGNUTransService.cpp	23 Jul 2004 14:35:03 -0000	1.13
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.13  2004/07/23 14:35:03  amassari
  + * A global mutex was not cleaned up
  + *
    * Revision 1.12  2004/02/25 14:53:24  peiyongz
    * Bug#27209: Xerces 2.5.0 does not build with option -t IconvGNU because of syntax errors!
    *
  @@ -114,6 +117,7 @@
   
   #if !defined(APP_NO_THREADS)
   #include <xercesc/util/Mutexes.hpp>
  +#include <xercesc/util/XMLRegisterCleanup.hpp>
   #endif /* !APP_NO_THREADS */
   
   XERCES_CPP_NAMESPACE_BEGIN
  @@ -122,6 +126,7 @@
   
   // Iconv() access syncronization point
   static XMLMutex    *gIconvMutex = NULL;
  +static XMLRegisterCleanup IconvGNUMutexCleanup;
   #  define ICONV_LOCK    XMLMutexLock lockConverter(gIconvMutex);
   
   #else /* APP_NO_THREADS */
  @@ -502,6 +507,12 @@
   //  IconvGNUTransService: Constructors and Destructor
   // ---------------------------------------------------------------------------
   
  +void reinitIconvGNUMutex()
  +{
  +    delete gIconvMutex;
  +    gIconvMutex = 0;
  +}
  +
   IconvGNUTransService::IconvGNUTransService()
       : IconvGNUWrapper(), fUnicodeCP(0)
   {
  @@ -511,6 +522,7 @@
           gIconvMutex = new XMLMutex;
           if (gIconvMutex == NULL)
               XMLPlatformUtils::panic (PanicHandler::Panic_NoTransService);
  +        IconvGNUMutexCleanup.registerCleanup(reinitIconvGNUMutex);
       }
   #endif
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org