// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
// Alagaraja Ramasubramanian, IBM (alags_raj@in.ibm.com) - PEP-167
// Amit K Arora, IBM (amitarora@in.ibm.com) - Bug#2333, #2351
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#3370
+// David Dillard, VERITAS Software Corp.
+// (david.dillard@veritas.com)
//
//%/////////////////////////////////////////////////////////////////////////////
#include "cmdline.h"
#include "cmdlineExceptions.h"
#include <Pegasus/getoopt/getoopt.h>
-#include <fstream>
#include <Pegasus/Common/String.h>
-//#include <strstream>
-//#include <sstream>
#ifdef PEGASUS_OS_OS400
-#include <qycmutiltyUtility.H>
+#include <qycmutiltyUtility.H>
#include <qycmutilu2.H>
-#endif
+#endif
+
-
#define DEFAULT_SERVER_AND_PORT "localhost:5988"
#ifndef DISABLE_CIMMOFL_WARNING
}
#endif
-ostream &
+ostream &
help(ostream &os, int progtype) {
-
+
//l10n menu
//PEP167 change
String help;
}
help.append( " [ mof_file ... ]\n");
- help.append("Options : \n");
+ help.append("Options : \n");
help.append( " -h, --help - Display this help message \n");
help.append( " --version - Display CIM Server version\n");
help.append( " -w - Suppress warning messages\n");
help.append( " -N - Specify the repository name - defaults to \"repository\"\n");
help.append( " -M - Repository mode [XML, BIN] - defaults to \"XML\"\n");
}
-#else
+#else
if(progtype == 1)
help.append("Usage: ").append("cimmofl");
else
#else
help.append( " [ mof_file... ]\n");
#endif
- help.append("Options :\n");
+ help.append("Options :\n");
help.append( " -h, --help - Display this help message\n");
help.append( " --version - Display CIM Server version\n");
help.append( " -E - Syntax check only\n");
MessageLoaderParms parms ;
if(progtype == 1)
{
- parms = MessageLoaderParms("Compiler.cmdline.cimmofl.cmdline.MENU.STANDARD",help);
+ parms = MessageLoaderParms("Compiler.cmdline.cimmofl.cmdline.MENU.STANDARD",help);
#ifdef PEGASUS_OS_HPUX
parms = MessageLoaderParms("Compiler.cmdline.cimmofl.cmdline.MENU.PEGASUS_OS_HPUX",help);
}
else
{
- parms = MessageLoaderParms("Compiler.cmdline.cimmof.cmdline.MENU.STANDARD",help);
+ parms = MessageLoaderParms("Compiler.cmdline.cimmof.cmdline.MENU.STANDARD",help);
#ifdef PEGASUS_OS_HPUX
parms = MessageLoaderParms("Compiler.cmdline.cimmof.cmdline.MENU.PEGASUS_OS_HPUX",help);
while (ifs != 0) {
GetLine(ifs, line);
- if (line.size() > 0)
+ if (line.size() > 0)
cmdlinedata.add_filespecs(line);
}
return 0;
}
/* flag value, type, islong?, needsValue? */
-static struct optspec optspecs[] =
+static struct optspec optspecs[] =
{
{(char*)"", FILESPEC, false, getoopt::NOARG},
{(char*)"h", HELPFLAG, false, getoopt::NOARG},
{(char*)"help", HELPFLAG, true, getoopt::NOARG},
{(char*)"version", VERSIONFLAG, true, getoopt::NOARG},
{(char*)"n", NAMESPACE, false, getoopt::MUSTHAVEARG},
- {(char*)"namespace", NAMESPACE, true, getoopt::MUSTHAVEARG},
+ {(char*)"namespace", NAMESPACE, true, getoopt::MUSTHAVEARG},
{(char*)"I", INCLUDEPATH, false, getoopt::MUSTHAVEARG},
//PEP167 - not required
//{(char*)"Include", INCLUDEPATH, true, getoopt::MUSTHAVEARG},
//PEP167 - 'f' and 'filelist' options disabled as per PEP
//{(char*)"f", FILELIST, false, getoopt::MUSTHAVEARG},
//{(char*)"filelist", FILELIST, true, getoopt::MUSTHAVEARG},
- {(char*)"E", SYNTAXFLAG, false, getoopt::NOARG},
+ {(char*)"E", SYNTAXFLAG, false, getoopt::NOARG},
{(char*)"trace", TRACEFLAG, true, getoopt::OPTIONALARG},
{(char*)"xml", XMLFLAG, true, getoopt::NOARG},
#endif
if(progtype == 1 && o.catagory == OPTEND_CIMMOF) continue;
else if(progtype == 1 && o.catagory == OPTEND_CIMMOFL) break;
else if(progtype == 0 && o.catagory == OPTEND_CIMMOF) break;
-
+
//if (o.flag == "") Bug#2314 - Incorrect comparison
if ((o.flag != 0) && (o.flag[0] == '\0'))
continue;
//PEP167 change - 2nd argument char* added
static opttypes
catagorize(const Optarg &arg, int progtype) {
-
+
for (unsigned int i = 0; ; i++) {
const optspec &o = optspecs[i];
//PEP167 change
}
if(progtype == 0)
return OPTEND_CIMMOF;
- else
+ else
return OPTEND_CIMMOFL;
}
const char *pos2;
pos = strrchr(name, SEPCHAR);
pos2 = strrchr(name, SEPCHAR2);
- pos = (pos2 > pos) ? pos2 : pos;
+ pos = (pos2 > pos) ? pos2 : pos;
if (!pos)
pos = name;
else
cmdline.parse(argc, argv);
switch (getType(argv[0])) {
case 1: cmdlinedata.set_is_local();
- #ifdef PEGASUS_OS_OS400
+ #ifdef PEGASUS_OS_OS400
// check if we are in qsh, if we are NOT running in a qsh environment then
// send and escape message,
// if we ARE then call ycmServerIsActive without the quiet option
return CPFDF81_RC;
}
}
-#pragma convert(0)
-#endif
+#pragma convert(0)
+#endif
break;
default: cmdlinedata.reset_is_local();
}
applyDefaults(cmdlinedata);
if (cmdline.hasErrors()) {
-
+
// throw an exception and hande it in the caller
//l10n
//String msg = "Command line errors:\n";
MessageLoaderParms parms("Compiler.cmdline.cimmof.CMDLINE_ERRORS",
"Command line errors:\n");
- String msg = MessageLoader::getMessage(parms);
+ String msg = MessageLoader::getMessage(parms);
cmdline.printErrors(msg);
throw ArgumentErrorsException(msg);
throw ArgumentErrorsException(parms);
switch (c)
{
- case VERSIONFLAG:
+ case VERSIONFLAG:
if(type != -1) throw ArgumentErrorsException(parms);
break;
- case HELPFLAG:
+ case HELPFLAG:
if(type != -1) throw ArgumentErrorsException(parms);
break;
case INCLUDEPATH:cmdlinedata.add_include_path(arg.optarg());
break;
case REPOSITORYNAME: cmdlinedata.set_repository_name(arg.optarg());
break;
- case REPOSITORYMODE:
+ case REPOSITORYMODE:
{
cmdlinedata.set_repository_mode(arg.optarg());
MessageLoaderParms parms("Compiler.cmdline.cimmof.UNKNOWN_VALUE_OPTION_A",
"Unknown value specified for option -M.");
throw ArgumentErrorsException(parms);
- }
+ }
}
break;
case UPDATEFLAG:
- {
+ {
if (arg.optarg().size() == 1)
{
for (unsigned int i = 0; i < arg.optarg().size(); i++)
}
break;
case ALLOWFLAG:
- {
+ {
if ((arg.optarg().size() <= 2) && (arg.optarg().size() != 0))
{
for (unsigned int i = 0; i < arg.optarg().size(); i++)
cmdlinedata.set_operationType(
compilerCommonDefs::DO_NOT_ADD_TO_REPOSITORY);
break;
- case TRACEFLAG:
+ case TRACEFLAG:
{
cmdlinedata.set_trace();
const String &s = arg.optarg();
// This is used during product installation and PTF application.
// We must be absolutely quiet to avoid a terminal being
// activated in native mode.
- case QUIETFLAG:
+ case QUIETFLAG:
cmdlinedata.set_quiet();
// Redirect to /dev/null.
// Works for both qshell and native modes.
help(helpos, getType(argv[0]));
return(-1);
}
-
+
if (String::equal(cmdlinedata.get_repository(), String::EMPTY)) {
//l10n
throw CmdlineNoRepository(parms);
}
-#ifdef PEGASUS_OS_OS400
+#ifdef PEGASUS_OS_OS400
// Force a mof to be specified on OS/400
if (cmdlinedata.get_filespec_list().size() == 0) {
//l10n
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
-//
+//
// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
//
// Author: Mike Brasher (mbrasher@bmc.com)
//
-// Modified By: Mike Day (mdday@us.ibm.com)
-//
-// Modified By: Karl Schopmeyer (k.schopmeyer@opengroup.org)
-//
-// Modified By: Nag Boranna (nagaraja_boranna@hp.com)
-//
-// Modified By: Jenny Yu (jenny_yu@hp.com)
-//
-// Modified By: Sushma Fernandes (sushma_fernandes@hp.com)
+// Modified By: Mike Day (mdday@us.ibm.com)
+// Karl Schopmeyer (k.schopmeyer@opengroup.org)
+// Nag Boranna (nagaraja_boranna@hp.com)
+// Jenny Yu (jenny_yu@hp.com)
+// Sushma Fernandes (sushma_fernandes@hp.com)
// Carol Ann Krug Graves, Hewlett-Packard Company
-// (carolann_graves@hp.com)
-// Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
-//
-// Modified By: Dave Rosckes (rosckes@us.ibm.com)
-//
-// Modified By: Humberto Rivero (hurivero@us.ibm.com)
-//
-// Modified By: Steve Hills (steve.hills@ncr.com)
+// (carolann_graves@hp.com)
+// Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
+// Dave Rosckes (rosckes@us.ibm.com)
+// Humberto Rivero (hurivero@us.ibm.com)
+// Steve Hills (steve.hills@ncr.com)
// Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com)
-//
-// Modified By: Amit K Arora, IBM (amitarora@in.ibm.com) - pep 167
-//
-// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2555
-//
-// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2032
-//
-// Modified By: Heather Sterling, IBM (hsterl@us.ibm.com) - PEP#222
-//
-// Modified By: Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#3452
+// Amit K Arora, IBM (amitarora@in.ibm.com) - pep 167
+// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2555
+// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#2032
+// Heather Sterling, IBM (hsterl@us.ibm.com) - PEP#222
+// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) - Bug#3452
+// David Dillard, VERITAS Software Corp.
+// (david.dillard@veritas.com)
//
//%/////////////////////////////////////////////////////////////////////////////
//
// Notes on deamon operation (Unix) and service operation (Win 32):
//
-// To run pegasus as a daemon on Unix platforms:
+// To run pegasus as a daemon on Unix platforms:
//
// cimserver
//
//
// cimserver daemon=false
//
-// The daemon config property has no effect on windows operation.
+// The daemon config property has no effect on windows operation.
//
// To shutdown pegasus, use the -s option:
-//
-// cimserver -s
+//
+// cimserver -s
//
// To run pegasus as an NT service, there are FOUR different possibilities:
//
-// To INSTALL the Pegasus service,
+// To INSTALL the Pegasus service,
//
// cimserver -install
//
-// To REMOVE the Pegasus service,
+// To REMOVE the Pegasus service,
//
// cimserver -remove
//
-// To START the Pegasus service,
+// To START the Pegasus service,
//
// net start cimserver
// or
// cimserver -start
//
-// To STOP the Pegasus service,
+// To STOP the Pegasus service,
//
// net stop cimserver
// or
// cimserver -stop
//
-// Alternatively, you can use the windows service manager. Pegasus shows up
+// Alternatively, you can use the windows service manager. Pegasus shows up
// in the service database as "Pegasus CIM Object Manager"
//
// Mike Day, mdday@us.ibm.com
-//
+//
//////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
#include <Pegasus/Common/Constants.h>
-#include <iostream>
#include <cassert>
#include <cstdlib>
-#include <fstream>
#include <Pegasus/Common/FileSystem.h>
#include <Pegasus/Common/Monitor.h>
#include <Pegasus/Common/PegasusVersion.h>
{
return PEGASUS_SERVICE_DESCRIPTION;
}
-
+
//defined in PegasusVersion.h
virtual const char* getVersion() const
{
cout << endl;
cout << _cimServerProcess->getProductName() << " " << _cimServerProcess->getVersion() << endl;
cout << endl;
-
+
#if defined(PEGASUS_OS_TYPE_WINDOWS)
MessageLoaderParms parms("src.Server.cimserver.MENU.WINDOWS", usage);
#elif defined(PEGASUS_USE_RELEASE_DIRS)
// Dummy function for the Thread object associated with the initial thread.
// Since the initial thread is used to process CIM requests, this is
// needed to localize the exceptions thrown during CIM request processing.
-// Note: This function should never be called!
-//
+// Note: This function should never be called!
+//
PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL dummyThreadFunc(void *parm)
{
- return((PEGASUS_THREAD_RETURN)0);
+ return((PEGASUS_THREAD_RETURN)0);
}
void shutdownCIMOM(Uint32 timeoutValue)
String hostStr = System::getHostName();
//
- // open connection to CIMOM
+ // open connection to CIMOM
//
try
{
//
String referenceStr = "//";
referenceStr.append(hostStr);
- referenceStr.append("/");
+ referenceStr.append("/");
referenceStr.append(PEGASUS_NAMESPACENAME_SHUTDOWN.getString());
referenceStr.append(":");
referenceStr.append(PEGASUS_CLASSNAME_SHUTDOWN.getString());
if (e.getCode() == CIM_ERR_INVALID_NAMESPACE)
{
//
- // Repository may be empty.
+ // Repository may be empty.
//
//l10n - TODO
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
PEGASUS_STD(cerr) << e.getMessage() << PEGASUS_STD(endl);
}
- // Kill the cimserver process
+ // Kill the cimserver process
if (_cimServerProcess->cimserver_kill(0) == 0)
{
//l10n - TODO
//
// This may mean that the CIM Server has terminated, causing this
// client to get a "Empty HTTP response message" exception. It may
- // also mean that the CIM Server is taking longer than 2 seconds
- // (client timeout value) to terminate, causing this client to
+ // also mean that the CIM Server is taking longer than 2 seconds
+ // (client timeout value) to terminate, causing this client to
// timeout with a "connection timeout" exception.
//
// Check to see if CIM Server is still running. If CIM Server
// loop and wait one second until either the CIM Server is
// terminated or timeout expires. If timeout expires and
// the CIM Server is still running, kill the CIMServer process.
- //
+ //
Uint32 maxWaitTime = timeoutValue - 2;
Boolean running = _cimServerProcess->isCIMServerRunning();
while ( running && maxWaitTime > 0 )
if (running)
{
int kill_rc = _cimServerProcess->cimserver_kill(0);
-
+
#ifdef PEGASUS_OS_OS400
if(kill_rc == -1)
_cimServerProcess->cimserver_exitRC(2);
//l10n
// Set Message loading to process locale
-MessageLoader::_useProcessLocale = true;
+MessageLoader::_useProcessLocale = true;
//l10n
//l10n
{
System::bindVerbose = true;
//l10n
- //cout << "Unsupported debug option, BIND_VERBOSE, enabled."
+ //cout << "Unsupported debug option, BIND_VERBOSE, enabled."
//<< endl;
MessageLoaderParms parms("src.Server.cimserver.UNSUPPORTED_DEBUG_OPTION",
"Unsupported debug option, BIND_VERBOSE, enabled.");
cout << MessageLoader::getMessage(parms) << endl;
// remove the option from the command line
memmove(&argv[i], &argv[i + 1], (argc-i) * sizeof(char*));
- argc--;
+ argc--;
}
#endif
//
//cout << "Duplicate shutdown option specified." << endl;
MessageLoaderParms parms("src.Server.cimserver.DUPLICATE_SHUTDOWN_OPTION",
"Duplicate shutdown option specified.");
-
+
cout << MessageLoader::getMessage(parms) << endl;
exit(0);
}
shutdownOption = true;
-
+
// remove the option from the command line
memmove(&argv[i], &argv[i + 1], (argc-i) * sizeof(char*));
- argc--;
+ argc--;
}
else
i++;
//
// The main, common, running code
//
-// NOTE: Do NOT call exit(). Use return(), otherwise some platforms
+// NOTE: Do NOT call exit(). Use return(), otherwise some platforms
// will fail to shutdown properly/cleanly.
//
-// TODO: Current change minimal for platform "service" shutdown bug fixes.
-// Perhpas further extract out common stuff and put into main(), put
-// daemon stuff into platform specific platform_run(), etc.
-// Note: make sure to not put error handling stuff that platform
+// TODO: Current change minimal for platform "service" shutdown bug fixes.
+// Perhpas further extract out common stuff and put into main(), put
+// daemon stuff into platform specific platform_run(), etc.
+// Note: make sure to not put error handling stuff that platform
// specific runs may need to deal with bettter (instead of exit(), etc).
//
// to save the job log.
system ("QSYS/CHGJOB JOB(*) LOG(4 00 *SECLVL)");
}
-#endif
+#endif
//
// Get options (from command line and from configuration file); this
{
#ifdef PEGASUS_OS_OS400
if (os400StartupOption == false)
-#endif
+#endif
GetOptions(configManager, argc, argv);
}
catch (Exception& e)
// l10n
// Set the home directory, msg sub-dir, into the MessageLoader.
- // This will be the default directory where the resource bundles
- // are found.
+ // This will be the default directory where the resource bundles
+ // are found.
MessageLoader::setPegasusMsgHome(ConfigManager::getHomedPath(
- ConfigManager::getInstance()->getCurrentValue("messageDir")));
+ ConfigManager::getInstance()->getCurrentValue("messageDir")));
#ifdef PEGASUS_OS_OS400
// Still need to declare and set the connection variables.
// NOTE: OS400 is a LOCAL_DOMAIN_SOCKET, so a few lines down
// the test will not be compiled in. If OS400 ever turns off that
// define, then we will need to change this code path to insure that
- // one of the variables is true.
+ // one of the variables is true.
Boolean enableHttpConnection = false;
Boolean enableHttpsConnection = false;
Boolean enableSSLExportClientVerification = false;
{
daemonOption = true;
}
-
+
#ifdef PEGASUS_OS_OS400
if (os400StartupOption == false)
{
-#endif
+#endif
// Get the log file directory definition.
// We put String into Cstring because
// Directory functions only handle Cstring.
#if !defined(PEGASUS_USE_SYSLOGS)
// When using syslog facility. No files anymore.
logsDirectory = configManager->getCurrentValue("logdir");
- logsDirectory =
+ logsDirectory =
ConfigManager::getHomedPath(configManager->getCurrentValue("logdir"));
#endif
#ifdef PEGASUS_OS_OS400
#endif
//
- // Check to see if we need to shutdown CIMOM
+ // Check to see if we need to shutdown CIMOM
//
if (shutdownOption)
{
- String configTimeout =
+ String configTimeout =
configManager->getCurrentValue("shutdownTimeout");
Uint32 timeoutValue = strtol(configTimeout.getCString(), (char **)0, 10);
-
+
shutdownCIMOM(timeoutValue);
#ifdef PEGASUS_OS_OS400
//l10n
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,
- //"CIM Server stopped.");
+ //"CIM Server stopped.");
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::INFORMATION,
"src.Server.cimserver.SERVER_STOPPED",
"CIM Server stopped.");
#ifdef PEGASUS_OS_OS400
//l10n
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
- //"Error: $0",e.getMessage());
+ //"Error: $0",e.getMessage());
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
"src.Server.cimserver.ERROR",
- "Error: $0",e.getMessage());
+ "Error: $0",e.getMessage());
#else
//l10n
//cout << "Error: " << e.getMessage() << endl;
portNumberHttps = System::lookupPort(WBEM_HTTPS_SERVICE_NAME, WBEM_DEFAULT_HTTPS_PORT);
} else
- {
+ {
//
// user-specified
//
//l10n
// reset message loading to NON-process locale
-MessageLoader::_useProcessLocale = false;
+MessageLoader::_useProcessLocale = false;
//l10n
// Get the parent's PID before forking
_cimServerProcess->set_parent_pid(System::getPID());
-
+
// do we need to run as a daemon ?
if (daemonOption)
{
return(0);
}
#endif
-
+
}
// l10n
// to service CIM requests.
// The run function for the dummy Thread should never be called,
Thread *dummyInitialThread = new Thread(dummyThreadFunc, NULL, false);
- Thread::setCurrent(dummyInitialThread);
+ Thread::setCurrent(dummyInitialThread);
AcceptLanguages default_al;
try{
- default_al = AcceptLanguages::getDefaultAcceptLanguages();
+ default_al = AcceptLanguages::getDefaultAcceptLanguages();
Thread::setLanguages(new AcceptLanguages(default_al));
}catch(InvalidAcceptLanguageHeader& e){
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
"src.Server.cimserver.FAILED_TO_SET_PROCESS_LOCALE",
- "Could not convert the system process locale into a valid AcceptLanguage format.");
+ "Could not convert the system process locale into a valid AcceptLanguage format.");
Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
- e.getMessage());
+ e.getMessage());
}
-
-
+
+
#ifdef PEGASUS_OS_OS400
// Special server initialization code for OS/400.
// do some logging here!
//l10n
//Logger::put(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
- //"CIM Server failed to initialize");
+ //"CIM Server failed to initialize");
Logger::put_l(Logger::ERROR_LOG, System::CIMSERVER, Logger::SEVERE,
"src.Server.cimserver.SERVER_FAILED_TO_INITIALIZE",
- "CIM Server failed to initialize");
+ "CIM Server failed to initialize");
return(-1);
- }
+ }
#endif
//
// check if CIMServer is already running
- // if CIMServer is already running, print message and
+ // if CIMServer is already running, print message and
// notify parent process (if there is a parent process) to terminate
//
if(_cimServerProcess->isCIMServerRunning())
return(1);
}
-
+
#endif
// try loop to bind the address, and run the server
//l10n
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
//"Listening on HTTP port $0.", portNumberHttp);
-
+
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::INFORMATION,
"src.Server.cimserver.LISTENING_ON_HTTP_PORT",
"Listening on HTTP port $0.", portNumberHttp);
#endif
// bind throws an exception if the bind fails
- try {
+ try {
_cimServer->bind();
} catch (const BindFailedException &e)
{
deleteCIMServer();
return 1;
}
- // 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.
if (daemonOption)
_cimServerProcess->notify_parent(0);
#if defined(PEGASUS_DEBUG)
cout << "Started. " << endl;
#endif
-
+
// Put server started message to the logger
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER,
Logger::INFORMATION,
|| defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || defined(PEGASUS_OS_AIX) \
|| defined(PEGASUS_PLATFORM_SOLARIS_SPARC_CC) || defined(PEGASUS_OS_VMS)
//
- // close the file created at startup time to indicate that the
+ // close the file created at startup time to indicate that the
// cimserver has terminated normally.
//
FileSystem::removeFile(_cimServerProcess->getPIDFileName());
//l10n
//Logger::put(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
- //"Error: $0", e.getMessage());
+ //"Error: $0", e.getMessage());
Logger::put_l(Logger::STANDARD_LOG, System::CIMSERVER, Logger::WARNING,
"src.Server.cimserver.ERROR",
- "Error: $0", e.getMessage());
+ "Error: $0", e.getMessage());
#ifndef PEGASUS_OS_OS400
//l10n