version 1.31, 2003/11/11 21:35:39
|
version 1.32, 2003/11/11 22:22:41
|
|
|
#include "XmlWriter.h" | #include "XmlWriter.h" |
#include "XmlReader.h" | #include "XmlReader.h" |
#include "ArrayInternal.h" | #include "ArrayInternal.h" |
#include "CIMOMPort.h" |
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
String& host) | String& host) |
{ | { |
// See if there is a host name (true if it begins with "//"): | // See if there is a host name (true if it begins with "//"): |
// Host is of the from <hostname>-<port> and begins with "//" |
// Host is of the form <hostname>:<port> and begins with "//" |
// and ends with "/": | // and ends with "/": |
| |
if (p[0] != '/' || p[1] != '/') | if (p[0] != '/' || p[1] != '/') |
|
|
} | } |
} | } |
| |
// We now expect a port (or default the port). |
// Check for a port: |
| |
if (*q == ':') | if (*q == ':') |
{ | { |
|
|
| |
while (isdigit(*q)) | while (isdigit(*q)) |
q++; | q++; |
|
} |
| |
// Finally, assign the host name: | // Finally, assign the host name: |
| |
host.assign(p, q - p); | host.assign(p, q - p); |
} |
|
else |
|
{ |
|
host.assign(p, q - p); |
|
|
|
// Assign the default port number: |
|
|
|
host.append(":"); |
|
host.append(PEGASUS_CIMOM_DEFAULT_PORT_STRING); |
|
} |
|
| |
// Check for slash terminating the entire sequence: | // Check for slash terminating the entire sequence: |
| |