Author: cargilld
Date: Tue Apr 22 08:16:36 2008
New Revision: 650547

URL: http://svn.apache.org/viewvc?rev=650547&view=rev
Log:
Fix for xercesc-1796.  All tests were failing when iconv390 was used as a 
transcoder.

Modified:
    
xerces/c/branches/xerces-2/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp

Modified: 
xerces/c/branches/xerces-2/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/branches/xerces-2/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp?rev=650547&r1=650546&r2=650547&view=diff
==============================================================================
--- 
xerces/c/branches/xerces-2/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp
 (original)
+++ 
xerces/c/branches/xerces-2/src/xercesc/util/Transcoders/Iconv390/Iconv390TransService.cpp
 Tue Apr 22 08:16:36 2008
@@ -1,10 +1,9 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Copyright 1999-2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  * 
  *      http://www.apache.org/licenses/LICENSE-2.0
  * 
@@ -99,12 +98,12 @@
     ,   0x70, 0xDD, 0xDE, 0xDB, 0xDC, 0x8D, 0x8E, 0xDF
 };
 iconvconverter * converterList;
-XMLMutex  converterListMutex;
+XMLMutex*  converterListMutex = 0;
 
 iconvconverter * addConverter(const char* const EncodingName
                              ,XMLTransService::Codes& resValue)
 {
-    XMLMutexLock lockConverterlist(&converterListMutex);
+    XMLMutexLock lockConverterlist(converterListMutex);
     iconvconverter *tconv=converterList;
     while ( (tconv) &&
             (strcmp(tconv->name,EncodingName)) )
@@ -134,7 +133,7 @@
     iconvconverter *pconv,*tconv;
     tconv = 0;
     if (converter) {
-      XMLMutexLock lockConverterlist(&converterListMutex);
+      XMLMutexLock lockConverterlist(converterListMutex);
       if (--converter->usecount==0) {
         tconv = converterList;
         pconv = (iconvconverter*)&converterList;
@@ -173,10 +172,12 @@
 // ---------------------------------------------------------------------------
 Iconv390TransService::Iconv390TransService()
 {
+ converterListMutex = new XMLMutex();
 }
 
 Iconv390TransService::~Iconv390TransService()
 {
+ delete converterListMutex;
 }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to