(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.23

version 1.22, 2002/09/20 19:40:11 version 1.23, 2002/09/21 15:39:28
Line 451 
Line 451 
     p += 2;     p += 2;
  
     //----------------------------------------------------------------------     //----------------------------------------------------------------------
     // 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;     char* q = p;
  
       Boolean foundDot = true;
       while (foundDot == true)
       {
           foundDot = false;
   
     if (!isalpha(*q))     if (!isalpha(*q))
         throw MalformedObjectNameException(objectName);         throw MalformedObjectNameException(objectName);
  
     q++;     q++;
  
     while (isalnum(*q) || *q == '-')     while (isalnum(*q) || *q == '-')
           {
         q++;         q++;
           }
   
           if (*q == '.')
           {
               q++;
               foundDot = true;
           }
        }
  
     // We now expect a port (or default the port).     // We now expect a port (or default the port).
  


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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2