amassari 2004/09/14 13:33:39 Modified: c/src/xercesc/util/Transcoders/Win32 Win32TransService.cpp Log: Don't treat errors in the registry as fatal (jira# 855) - based on a patch by Ron Romero Revision Changes Path 1.23 +12 -13 xml-xerces/c/src/xercesc/util/Transcoders/Win32/Win32TransService.cpp Index: Win32TransService.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Transcoders/Win32/Win32TransService.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- Win32TransService.cpp 8 Sep 2004 13:56:47 -0000 1.22 +++ Win32TransService.cpp 14 Sep 2004 20:33:39 -0000 1.23 @@ -234,9 +234,9 @@ // const unsigned int nameBufSz = 1024; char nameBuf[nameBufSz + 1]; - unsigned int subIndex = 0; + unsigned int subIndex; unsigned long theSize; - while (true) + for (subIndex = 0;;++subIndex) { // Get the name of the next key theSize = nameBufSz; @@ -261,7 +261,7 @@ , KEY_READ , &encodingKey)) { - XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService); + continue; } // @@ -289,7 +289,8 @@ , (unsigned char*)&CPId , &theSize) != ERROR_SUCCESS) { - XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService); + ::RegCloseKey(encodingKey); + continue; } // @@ -308,7 +309,8 @@ , (unsigned char*)&IEId , &theSize) != ERROR_SUCCESS) { - XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService); + ::RegCloseKey(encodingKey); + continue; } CPMapEntry* newEntry = new CPMapEntry(nameBuf, CPId, IEId); @@ -316,9 +318,8 @@ } } - // And now close the subkey handle and bump the subkey index + // And close the subkey handle ::RegCloseKey(encodingKey); - subIndex++; } // @@ -327,9 +328,8 @@ // built and add a new entry with this new name and the same id // values we stored for the original. // - subIndex = 0; char aliasBuf[nameBufSz + 1]; - while (true) + for (subIndex = 0;;++subIndex) { // Get the name of the next key theSize = nameBufSz; @@ -354,7 +354,7 @@ , KEY_READ , &encodingKey)) { - XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService); + continue; } // @@ -411,9 +411,8 @@ } } - // And now close the subkey handle and bump the subkey index + // And close the subkey handle ::RegCloseKey(encodingKey); - subIndex++; } // And close the main key handle
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]