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

Diff for /pegasus/src/Pegasus/Common/CIMObjectPath.cpp between version 1.22 and 1.25.2.1

version 1.22, 2002/09/20 19:40:11 version 1.25.2.1, 2003/02/06 20:47:03
Line 105 
Line 105 
 { {
     Uint32 n = x.size();     Uint32 n = x.size();
  
       //
       //  If the key is a reference, the keys in the reference must also be
       //  sorted
       //
       for (Uint32 k = 0; k < n ; k++)
           if (x[k].getType () == CIMKeyBinding::REFERENCE)
           {
               CIMObjectPath tmp (x[k].getValue ());
               Array <CIMKeyBinding> keyBindings = tmp.getKeyBindings ();
               _BubbleSort (keyBindings);
               tmp.setKeyBindings (keyBindings);
               x[k].setValue (tmp.toString ());
           }
   
     if (n < 2)     if (n < 2)
         return;         return;
  
Line 450 
Line 464 
  
     p += 2;     p += 2;
  
       char* q = p;
   
   
   //     ATTN: this has been disabled because the host name format depends
   //     on the commuication protocol, which is not specified by the CIM
   //     standard. It is, therefore, impractical to attempt to validate it.
   //     The host name should flow through the CIMOM unmodified and
   //     Clients/Providers can validate as needed.
   
     //----------------------------------------------------------------------     //----------------------------------------------------------------------
     // Validate the hostname. Hostnames must match the following      // Validate the hostname. A domain is allowed after the hostname.
     // regular expression: "[A-Za-z][A-Za-z0-9-]*"      // Eg. xyz.company.com
       // Hostnames must match the following regular expression:
       // ^([A-Za-z][A-Za-z0-9-]*)(\.[A-Za-z][A-Za-z0-9-]*)*$
     //----------------------------------------------------------------------     //----------------------------------------------------------------------
  
     char* q = p;  
  
     if (!isalpha(*q))  
         throw MalformedObjectNameException(objectName);  
  
     q++;  //     some host names may need to start with a number
  
     while (isalnum(*q) || *q == '-')  //     if (!isalpha(*q))
   //     throw IllformedObjectName(objectName);
   
   
   
       do
       {
           q++;
           while (isalnum(*q) || *q == '-' || *q == '_')
         q++;         q++;
       } while (*q == '.');
   
  
     // We now expect a port (or default the port).     // We now expect a port (or default the port).
  
Line 519 
Line 551 
         return false;         return false;
     }     }
  
       // A ':' as part of a keybinding value should not be interpreted as
       // a namespace delimiter.  Since keybinding pairs follow the first '.'
       // in the object path string, the ':' delimiter only counts if it
       // appears before the '.'.
   
       char* dot = strchr(p, '.');
       if (dot && (dot < colon))
       {
           return false;
       }
   
     //----------------------------------------------------------------------     //----------------------------------------------------------------------
     // Validate the namespace path.  Namespaces must match the following     // Validate the namespace path.  Namespaces must match the following
     // regular expression: "[A-Za-z_]+(/[A-Za-z_]+)*"     // regular expression: "[A-Za-z_]+(/[A-Za-z_]+)*"


Legend:
Removed from v.1.22  
changed lines
  Added in v.1.25.2.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2