You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2002/06/10 22:14:00 UTC

cvs commit: xml-xerces/c/src/xercesc/util TransService.cpp

peiyongz    2002/06/10 13:14:00

  Modified:    c/src/xercesc/util TransService.cpp
  Log:
  Bug# 1687: resValue not always updated when making a transcoder,
                     patch from tng.
  
  Revision  Changes    Path
  1.4       +13 -2     xml-xerces/c/src/xercesc/util/TransService.cpp
  
  Index: TransService.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/TransService.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TransService.cpp	12 Mar 2002 19:08:29 -0000	1.3
  +++ TransService.cpp	10 Jun 2002 20:14:00 -0000	1.4
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: TransService.cpp,v 1.3 2002/03/12 19:08:29 peiyongz Exp $
  + * $Id: TransService.cpp,v 1.4 2002/06/10 20:14:00 peiyongz Exp $
    */
   // ---------------------------------------------------------------------------
   //  Includes
  @@ -194,7 +194,10 @@
       const unsigned int bufSize = 2048;
       XMLCh upBuf[bufSize + 1];
       if (!XMLString::copyNString(upBuf, encodingName, bufSize))
  +    {
  +        resValue = XMLTransService::InternalFailure;
           return 0;
  +    }
       XMLString::upperCase(upBuf);
       ENameMap* ourMapping = gMappings->get(upBuf);
   
  @@ -229,7 +232,15 @@
       //  It wasn't an intrinsic and it wasn't disallowed, so pass it on
       //  to the trans service to see if he can make anything of it.
       //
  -    return makeNewXMLTranscoder(encodingName, resValue, blockSize);
  +
  +    XMLTranscoder* temp =  makeNewXMLTranscoder(encodingName, resValue, blockSize);
  +
  +    // if successful, set resValue to OK  
  +    // if failed, the makeNewXMLTranscoder has already set the proper failing resValue
  +    if (temp) resValue =  XMLTransService::Ok;    
  +
  +    return temp;
  +
   }
   
   
  
  
  

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