version 1.93.4.1, 2003/07/29 17:54:29
|
version 1.94, 2003/07/16 13:25:18
|
|
|
PEGASUS_STD(cerr) << "Unable to connect to CIM Server." << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "Unable to connect to CIM Server." << PEGASUS_STD(endl); |
PEGASUS_STD(cerr) << "CIM Server may not be running." << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "CIM Server may not be running." << PEGASUS_STD(endl); |
#endif | #endif |
cimserver_exit(1); |
cimserver_exit(0); |
} | } |
| |
try | try |
|
|
exit(1); | exit(1); |
} | } |
| |
|
// l10n |
|
// Set the home directory, msg sub-dir, into the MessageLoader. |
|
// This will be the default directory where the resource bundles |
|
// are found. |
|
String messagesDir = String::EMPTY; |
|
#ifdef PEGASUS_PLATFORM_OS400_ISERIES_IBM |
|
messagesDir = OS400_DEFAULT_MESSAGE_SOURCE; |
|
#else |
|
messagesDir = ConfigManager::getHomedPath("msg"); |
|
#endif |
|
MessageLoader::setPegasusMsgHome(messagesDir); |
|
|
Boolean enableHttpConnection = String::equal( | Boolean enableHttpConnection = String::equal( |
configManager->getCurrentValue("enableHttpConnection"), "true"); | configManager->getCurrentValue("enableHttpConnection"), "true"); |
Boolean enableHttpsConnection = String::equal( | Boolean enableHttpsConnection = String::equal( |
|
|
// notify parent process (if there is a parent process) to terminate | // notify parent process (if there is a parent process) to terminate |
// | // |
if (daemonOption) | if (daemonOption) |
notify_parent(1); |
notify_parent(); |
| |
exit(1); | exit(1); |
} | } |
|
|
server.bind(); | server.bind(); |
| |
// notify parent process (if there is a parent process) to terminate | // notify parent process (if there is a parent process) to terminate |
// so user knows that there is cimserver ready to serve CIM requests. |
// so user knows that cimserver is ready to serve CIM requests. |
if (daemonOption) | if (daemonOption) |
notify_parent(0); |
notify_parent(); |
| |
time_t last = 0; | time_t last = 0; |
| |
|
|
} | } |
catch(Exception& e) | catch(Exception& e) |
{ | { |
|
#ifdef PEGASUS_OS_OS400 |
Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, | Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING, |
"Error: $0", e.getMessage()); | "Error: $0", e.getMessage()); |
|
#else |
#ifndef PEGASUS_OS_OS400 |
|
PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); |
#endif | #endif |
| |
|
|
// notify parent process (if there is a parent process) to terminate | // notify parent process (if there is a parent process) to terminate |
// | // |
if (daemonOption) | if (daemonOption) |
notify_parent(1); |
notify_parent(); |
| |
return 1; | return 1; |
} | } |