version 1.76, 2002/10/02 19:31:23
|
version 1.79, 2002/10/15 21:41:03
|
|
|
useSLP = true; | useSLP = true; |
} | } |
| |
|
#if defined(PEGASUS_USE_RELEASE_CONFIG_OPTIONS) |
|
Boolean enableHttpConnection = String::equal( |
|
configManager->getCurrentValue("enableHttpConnection"), "true"); |
|
Boolean enableHttpsConnection = String::equal( |
|
configManager->getCurrentValue("enableHttpsConnection"), "true"); |
|
|
|
if (enableHttpConnection && enableHttpsConnection) |
|
{ |
|
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::WARNING, |
|
"Enabling both HTTP and HTTPS connections is unsupported. " |
|
"Only the HTTPS connection is enabled."); |
|
cerr << "Enabling both HTTP and HTTPS connections is unsupported. " |
|
"Only the HTTPS connection is enabled." << endl; |
|
} |
|
else if (!enableHttpConnection && !enableHttpsConnection) |
|
{ |
|
Logger::put(Logger::STANDARD_LOG, "CIMServer", Logger::WARNING, |
|
"Neither HTTP nor HTTPS connection is enabled. " |
|
"CIMServer will not be started."); |
|
cerr << "Neither HTTP nor HTTPS connection is enabled. " |
|
"CIMServer will not be started." << endl; |
|
exit(1); |
|
} |
|
|
|
useSSL = enableHttpsConnection; |
|
|
|
#else |
if (String::equal(configManager->getCurrentValue("SSL"), "true")) | if (String::equal(configManager->getCurrentValue("SSL"), "true")) |
{ | { |
useSSL = true; | useSSL = true; |
} | } |
|
#endif |
} | } |
catch (UnrecognizedConfigProperty e) | catch (UnrecognizedConfigProperty e) |
{ | { |
|
|
| |
#ifdef PEGASUS_OS_HPUX | #ifdef PEGASUS_OS_HPUX |
umask(S_IWGRP|S_IWOTH); | umask(S_IWGRP|S_IWOTH); |
|
|
|
// |
|
// check if CIMServer is already running |
|
// if CIMServer is already running, print message and |
|
// notify parent process (if there is a parent process) to terminate |
|
// |
|
if(isCIMServerRunning()) |
|
{ |
|
cout << "Unable to start CIMServer." << endl; |
|
cout << "CIMServer is already running." << endl; |
|
|
|
// |
|
// notify parent process (if there is a parent process) to terminate |
|
// |
|
if (daemonOption) |
|
notify_parent(); |
|
|
|
exit(1); |
|
} |
|
|
#endif | #endif |
| |
// try loop to bind the address, and run the server | // try loop to bind the address, and run the server |
|
|
catch(Exception& e) | catch(Exception& e) |
{ | { |
PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); | PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); |
|
|
|
// |
|
// notify parent process (if there is a parent process) to terminate |
|
// |
|
if (daemonOption) |
|
notify_parent(); |
|
|
return 1; | return 1; |
} | } |
| |