version 1.36.2.2, 2006/03/07 18:45:55
|
version 1.37, 2006/01/10 19:41:18
|
|
|
//%2006//////////////////////////////////////////////////////////////////////// |
//%2005//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
|
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
"CIMxmlIndicationHandler::handleIndication()"); | "CIMxmlIndicationHandler::handleIndication()"); |
| |
//get destination for the indication | //get destination for the indication |
Uint32 pos = indicationHandlerInstance.findProperty( |
Uint32 pos = indicationHandlerInstance.findProperty(CIMName ("destination")); |
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) + |
String msg = String(MessageLoader::getMessage(param) + e.getMessage()); |
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 = |
static String PROPERTY_NAME__SSLCERT_FILEPATH = "sslCertificateFilePath"; |
"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, |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
msg + dest); |
|
} | } |
} | } |
else | else |
|
|
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
} | } |
| |
bool parseError = false; |
char dummy[64]; |
|
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 ("/")); |
|
| |
char dummy; |
Uint32 slash = destStr.find ("/"); |
int noOfConversions = sscanf(portStr.getCString (), "%u%c", |
String portStr; |
&portNumber, &dummy); |
|
parseError = (noOfConversions != 1); |
if (slash != PEG_NOT_FOUND) |
|
{ |
|
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 |
{ | { |
hostStr = destStr.subString(0, destStr.find ("/")); |
Uint32 slash = 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]; |
if (!parseError) |
char dummy2[64]; |
{ |
dummy2[0] = 0; |
char dummy; |
|
int noOfConversions = sscanf(hostStr.getCString (), "%s%c", |
sscanf (hostStr.getCString (), "%s%s", hostName, dummy2); |
hostName, &dummy); |
|
parseError = (noOfConversions != 1); |
|
} |
|
| |
if (parseError) |
if (dummy[0] != 0 || dummy2[0] != 0) |
{ | { |
String msg = _getMalformedExceptionMsg(); | String msg = _getMalformedExceptionMsg(); |
| |