(file) Return to XmlReader.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/XmlReader.cpp between version 1.144 and 1.145

version 1.144, 2009/12/15 11:39:34 version 1.145, 2012/02/28 14:06:49
Line 399 
Line 399 
  
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
 #ifdef PEGASUS_SNIA_INTEROP_TEST  
     // In testing, replace illegal CIMName with this value to avoid the  
     // exception and let xml parsing continue.  THIS IS TEMP.  
     name = "BADNAMESUBSTITUTEDBYPEGASUSCLIENT";  
 #else  
   
     char buffer[MESSAGE_SIZE];     char buffer[MESSAGE_SIZE];
     sprintf(buffer, "%s.NAME", elementName);     sprintf(buffer, "%s.NAME", elementName);
  
Line 414 
Line 408 
         buffer);         buffer);
  
     throw XmlSemanticError(lineNumber, mlParms);     throw XmlSemanticError(lineNumber, mlParms);
   
 #endif  
     }     }
  
     return CIMNameCast(name);     return CIMNameCast(name);
Line 580 
Line 572 
  
     if (!CIMName::legal(name))     if (!CIMName::legal(name))
     {     {
 #ifdef PEGASUS_SNIA_INTEROP_TEST  
         name = "PEGASUS_SUBSTITUED_THIS_FOR_BAD_NAME";  
         return name;  
 #endif  
   
         char buffer[MESSAGE_SIZE];         char buffer[MESSAGE_SIZE];
         sprintf(buffer, "%s.REFERENCECLASS", elementName);         sprintf(buffer, "%s.REFERENCECLASS", elementName);
  
Line 1024 
Line 1011 
  
             try             try
             {             {
                 // KS 20021002 - Exception if no datetime value. Test for  
                 // zero length and leave the NULL value in the variable  
                 // Bugzilla 137  Adds the following if line.  
                 // Expect this to become permanent but test only for now  
 #ifdef PEGASUS_SNIA_INTEROP_TEST  
                 if (valueStringLen != 0)                 if (valueStringLen != 0)
 #endif                  {
                     tmp.set(valueString);                     tmp.set(valueString);
             }             }
               }
             catch (InvalidDateTimeFormatException&)             catch (InvalidDateTimeFormatException&)
             {             {
                 MessageLoaderParms mlParms(                 MessageLoaderParms mlParms(
Line 1220 
Line 1203 
  
         expectEndTag(parser, "VALUE");         expectEndTag(parser, "VALUE");
     }     }
 #ifdef PEGASUS_SNIA_INTEROP_TEST      value = stringToValue(parser.getLine(),valueString,valueStringLen,type);
     // KS 20021004 - tries to put value in even if empty.  
     // Think this is general problem with empty value  
     // Need to check meaning of (#PCDATA) - Does it allow empty.  
     // Bugzilla tbd  
     if (!empty)  
 #endif  
         value = stringToValue(  
             parser.getLine(),  
             valueString,  
             valueStringLen,  
             type);  
  
     return true;     return true;
 } }
Line 2075 
Line 2047 
  
     if (!testStartTag(parser, entry, "HOST"))     if (!testStartTag(parser, entry, "HOST"))
         return false;         return false;
 #ifdef PEGASUS_SNIA_INTEROP_TEST  
     // Temp code to allow empty HOST field.  
     // SNIA CIMOMs return empty field particularly on enumerateinstance.  
     // Simply substitute a string for the empty.  
     if (!parser.next(entry))  
         throw XmlException(XmlException::UNCLOSED_TAGS, parser.getLine());  
   
     if (entry.type == XmlEntry::CONTENT)  
         host = String(entry.text);  
     else  
     {  
         parser.putBack(entry);  
         host = "HOSTNAMEINSERTEDBYPEGASUSCLIENT";  
     }  
   
 #else  
  
     if (!parser.next(entry) || entry.type != XmlEntry::CONTENT)     if (!parser.next(entry) || entry.type != XmlEntry::CONTENT)
     {     {
Line 2101 
Line 2057 
     }     }
  
     host = String(entry.text);     host = String(entry.text);
 #endif  
     expectEndTag(parser, "HOST");     expectEndTag(parser, "HOST");
     return true;     return true;
 } }


Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2