From de600a064aa2a9daf3c5d4925a5ccc55e14c32d2 Mon Sep 17 00:00:00 2001 From: PeiYong Zhang <peiyongz@apache.org> Date: Tue, 12 Mar 2002 19:08:29 +0000 Subject: [PATCH] Bug# 1687: resValue not always updated when making a transcoder, patch from mark_russell@csgsystems.com git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@173571 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/TransService.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xercesc/util/TransService.cpp b/src/xercesc/util/TransService.cpp index c329b5693..46ebe90bb 100644 --- a/src/xercesc/util/TransService.cpp +++ b/src/xercesc/util/TransService.cpp @@ -200,7 +200,11 @@ XMLTransService::makeNewTranscoderFor( const XMLCh* const encoding // If we found it, then call the factory method for it if (ourMapping) - return ourMapping->makeNew(blockSize); + { + XMLTranscoder* temp = ourMapping->makeNew(blockSize); + resValue = temp ? XMLTransService::Ok : XMLTransService::InternalFailure; + return temp; + } // // For now, we have a little list of encodings that we disallow @@ -214,7 +218,10 @@ XMLTransService::makeNewTranscoderFor( const XMLCh* const encoding { // If its one of our guys, then pretend we don't understand it if (!XMLString::compareString(upBuf, gDisallowList[index])) + { + resValue = XMLTransService::UnsupportedEncoding; return 0; + } } } -- GitLab