version 1.38, 2006/01/30 16:17:51
|
version 1.39, 2006/02/24 22:06:39
|
|
|
"CIMxmlIndicationHandler::handleIndication()"); | "CIMxmlIndicationHandler::handleIndication()"); |
| |
//get destination for the indication | //get destination for the indication |
Uint32 pos = indicationHandlerInstance.findProperty(CIMName ("destination")); |
Uint32 pos = indicationHandlerInstance.findProperty( |
|
CIMName ("destination")); |
if (pos == PEG_NOT_FOUND) | if (pos == PEG_NOT_FOUND) |
{ | { |
String msg = _getMalformedExceptionMsg(); | String msg = _getMalformedExceptionMsg(); |
|
|
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler.ERROR", | "Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler.ERROR", |
"CIMxmlIndicationHandler Error: "); | "CIMxmlIndicationHandler Error: "); |
| |
String msg = String(MessageLoader::getMessage(param) + e.getMessage()); |
String msg = String(MessageLoader::getMessage(param) + |
|
e.getMessage()); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); |
| |
|
|
| |
try | try |
{ | { |
static String PROPERTY_NAME__SSLCERT_FILEPATH = "sslCertificateFilePath"; |
static String PROPERTY_NAME__SSLCERT_FILEPATH = |
|
"sslCertificateFilePath"; |
static String PROPERTY_NAME__SSLKEY_FILEPATH = "sslKeyFilePath"; | static String PROPERTY_NAME__SSLKEY_FILEPATH = "sslKeyFilePath"; |
| |
// | // |
|
|
"in Destination " + dest); | "in Destination " + dest); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
|
msg + dest); |
} | } |
} | } |
else | else |
|
|
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
} | } |
| |
char dummy[64]; |
bool parseError = false; |
dummy[0] = 0; |
|
colon = destStr.find (":"); | colon = destStr.find (":"); |
|
|
// | // |
// get hostname and port number from destination string | // get hostname and port number from destination string |
// | // |
|
|
{ | { |
hostStr = destStr.subString (0, colon); | hostStr = destStr.subString (0, colon); |
destStr = destStr.subString(colon + 1, PEG_NOT_FOUND); | destStr = destStr.subString(colon + 1, PEG_NOT_FOUND); |
|
String portStr = destStr.subString (0, destStr.find ("/")); |
| |
Uint32 slash = destStr.find ("/"); |
char dummy; |
String portStr; |
int noOfConversions = sscanf(portStr.getCString (), "%u%c", |
|
&portNumber, &dummy); |
if (slash != PEG_NOT_FOUND) |
parseError = (noOfConversions != 1); |
{ |
|
portStr = destStr.subString (0, slash); |
|
} |
|
else |
|
{ |
|
portStr = destStr.subString (0, PEG_NOT_FOUND); |
|
} |
|
|
|
sscanf (portStr.getCString (), "%u%s", &portNumber, dummy); |
|
} | } |
// | // |
// There is no port number in the destination string, | // There is no port number in the destination string, |
|
|
// | // |
else | else |
{ | { |
Uint32 slash = destStr.find ("/"); |
hostStr = destStr.subString(0, destStr.find ("/")); |
if (slash != PEG_NOT_FOUND) |
|
{ |
|
hostStr = destStr.subString (0, slash); |
|
} |
|
else |
|
{ |
|
hostStr = destStr.subString (0, PEG_NOT_FOUND); |
|
} |
|
if (useHttps) | if (useHttps) |
{ | { |
portNumber = System::lookupPort(WBEM_HTTPS_SERVICE_NAME, | portNumber = System::lookupPort(WBEM_HTTPS_SERVICE_NAME, |
|
|
} | } |
| |
char hostName[PEGASUS_MAXHOSTNAMELEN]; | char hostName[PEGASUS_MAXHOSTNAMELEN]; |
char dummy2[64]; |
if (!parseError) |
dummy2[0] = 0; |
{ |
|
char dummy; |
sscanf (hostStr.getCString (), "%s%s", hostName, dummy2); |
int noOfConversions = sscanf(hostStr.getCString (), "%s%c", |
|
hostName, &dummy); |
|
parseError = (noOfConversions != 1); |
|
} |
| |
if (dummy[0] != 0 || dummy2[0] != 0) |
if (parseError) |
{ | { |
String msg = _getMalformedExceptionMsg(); | String msg = _getMalformedExceptionMsg(); |
| |