version 1.42, 2002/03/08 20:02:54
|
version 1.43, 2002/04/26 21:02:26
|
|
|
| |
static const char OPTION_TIMEOUT = 'T'; | static const char OPTION_TIMEOUT = 'T'; |
| |
static const String NAMESPACE = "root/cimv2"; |
static const String NAMESPACE = "root/PG_Internal"; |
static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService"; | static const String CLASSNAME_SHUTDOWNSERVICE = "PG_ShutdownService"; |
static const String PROPERTY_TIMEOUT = "operationTimeout"; | static const String PROPERTY_TIMEOUT = "operationTimeout"; |
| |
|
|
// | // |
try | try |
{ | { |
client.connect(hostStr.allocateCString()); |
client.connectLocal(); |
} | } |
catch(Exception& e) |
catch(CIMClientException& e) |
{ | { |
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, | Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::INFORMATION, |
"Failed to connect to $0 $1.", PEGASUS_NAME, e.getMessage()); | "Failed to connect to $0 $1.", PEGASUS_NAME, e.getMessage()); |
|
|
"$0 terminated on port $1.", PEGASUS_NAME, portNumberStr); | "$0 terminated on port $1.", PEGASUS_NAME, portNumberStr); |
| |
} | } |
|
catch(CIMClientCIMException& e) |
|
{ |
|
PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl); |
|
exit(1); |
|
} |
|
catch(CIMClientException& e) |
|
{ |
|
// this may mean the cimserver has been terminated |
|
} |
catch(Exception& e) | catch(Exception& e) |
{ | { |
PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "Failed to shutdown server: " << e.getMessage() << PEGASUS_STD(endl); |