You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
| 2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
| 2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
(1) |
2
|
|
3
|
4
(1) |
5
(1) |
6
(1) |
7
|
8
(4) |
9
|
|
10
|
11
(1) |
12
(3) |
13
(1) |
14
|
15
|
16
|
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
|
31
|
|
|
|
|
|
|
|
From: <bni...@us...> - 2006-12-13 00:50:37
|
Revision: 424
http://svn.sourceforge.net/omc/?rev=424&view=rev
Author: bnicholes
Date: 2006-12-12 16:50:35 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
Since the prompt is really the handshaking mechanism between the client and the server, make sure that we only send the prompt after a response. Sending prompts out of order confuses the client
Modified Paths:
--------------
clp/trunk/src/omcclpdsvrconnection.cpp
Modified: clp/trunk/src/omcclpdsvrconnection.cpp
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:35:53 UTC (rev 423)
+++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-13 00:50:35 UTC (rev 424)
@@ -158,14 +158,20 @@
try
{
String line;
+ String prompt = "\r\n"CLPPROMPT;
while (sistr.good())
{
line.erase();
- /* Send the prompt to the client */
- sostr << "\r\n"CLPPROMPT;
- sostr.flush();
+ /* Only send a prompt if we have handled a request */
+ if (prompt.length())
+ {
+ /* Send the prompt to the client */
+ sostr << "\r\n"CLPPROMPT;
+ sostr.flush();
+ prompt.erase();
+ }
int selType = Select::SELECT_INTERRUPTED;
while(selType == Select::SELECT_INTERRUPTED)
@@ -197,6 +203,7 @@
Format("OMCClpdSvrConnection received line: %1", line));
clpref->runCommand(line);
sostr.flush();
+ prompt = "\r\n"CLPPROMPT;
}
if (clpref->shouldExit())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-12 21:35:53
|
Revision: 423
http://svn.sourceforge.net/omc/?rev=423&view=rev
Author: bnicholes
Date: 2006-12-12 13:35:53 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
Realign the socket interaction of the server so that all of the data input is detected by the select call rather than the getline function.
Modified Paths:
--------------
clp/trunk/src/omcclpc.cpp
clp/trunk/src/omcclpdsvrconnection.cpp
Modified: clp/trunk/src/omcclpc.cpp
===================================================================
--- clp/trunk/src/omcclpc.cpp 2006-12-12 21:33:29 UTC (rev 422)
+++ clp/trunk/src/omcclpc.cpp 2006-12-12 21:35:53 UTC (rev 423)
@@ -440,7 +440,7 @@
bool runOnce = false;
String histFile = getenv ("HOME");
String prompt;
- char lineBuf[1024];
+ char lineBuf[4096];
/* Get the timout value from the configuration file. */
String item = getConfigItem(OMCClpdConfigOpts::SERVER_TIMEOUT_opt,
@@ -587,7 +587,7 @@
/* Read the data from the socket and
parse it on carriage returns. */
memset(lineBuf, 0, sizeof(lineBuf));
- int bytesRead = m_socket.read(lineBuf, sizeof(lineBuf));
+ int bytesRead = m_socket.read(lineBuf, sizeof(lineBuf)-1);
/* If we got data back then process it. Otherwise consider it
to be an EOF and bail out. */
Modified: clp/trunk/src/omcclpdsvrconnection.cpp
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:33:29 UTC (rev 422)
+++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 21:35:53 UTC (rev 423)
@@ -61,37 +61,37 @@
//////////////////////////////////////////////////////////////////////////////
OMCClpdSvrConnection::OMCClpdSvrConnection(const Socket& socket,
- OMCClpdServer* pServer,
- IntrusiveReference<UnnamedPipe>& upipe)
- : Runnable()
- , m_pServer(pServer)
- , m_socket(socket)
- , m_upipe(upipe)
- , m_shutdown(false)
+ OMCClpdServer* pServer,
+ IntrusiveReference<UnnamedPipe>& upipe)
+ : Runnable()
+ , m_pServer(pServer)
+ , m_socket(socket)
+ , m_upipe(upipe)
+ , m_shutdown(false)
, m_clpSession()
{
- OW_LOG_DEBUG(pServer->getEnv()->getLogger(COMPONENT_NAME),
- "OMCClpdSvrConnection object created");
+ OW_LOG_DEBUG(pServer->getEnv()->getLogger(COMPONENT_NAME),
+ "OMCClpdSvrConnection object created");
- String item = pServer->getEnv()->getConfigItem(
- OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT);
- m_socket.setTimeouts(item.toInt32());
+ String item = pServer->getEnv()->getConfigItem(
+ OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT);
+ m_socket.setTimeouts(item.toInt32());
}
//////////////////////////////////////////////////////////////////////////////
// Destructor
OMCClpdSvrConnection::~OMCClpdSvrConnection()
{
- try
- {
- m_socket.disconnect();
- }
- catch (...)
- {
- // don't let exceptions escape
- }
+ try
+ {
+ m_socket.disconnect();
+ }
+ catch (...)
+ {
+ // don't let exceptions escape
+ }
- OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME),
- "OMCClpdSvrConnection object destroyed");
+ OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME),
+ "OMCClpdSvrConnection object destroyed");
}
//////////////////////////////////////////////////////////////////////////////
@@ -101,55 +101,52 @@
{
String bfr;
- if (is)
- {
- size_t count = 0;
- std::streambuf *sb = is.rdbuf();
-
- while (1)
- {
- int ch = sb->sbumpc();
- if (ch == EOF)
- {
- is.setstate(count == 0
- ? (std::ios::failbit | std::ios::eofbit) : std::ios::eofbit);
- break;
- }
-
- ++count;
-
- if ((ch == '\n') || (ch == '\r'))
- {
- break;
- }
+ if (is)
+ {
+ std::streambuf *sb = is.rdbuf();
+ sb->sgetc();
+ std::streamsize count = sb->in_avail();
+ bool stopReading = false;
- bfr += String((char)ch);
- }
- }
+ /* Since the CLP will only allow a single command before
+ responding, read a line up to the \n or \r and then
+ empty the buffer to make sure that the server
+ stays insync with the client. */
+ while (count-- > 0)
+ {
+ int ch = sb->sbumpc();
+
+ if ((ch == '\n') || (ch == '\r'))
+ stopReading = true;
- return bfr;
+ if (!stopReading)
+ bfr += String((char)ch);
+ }
+ }
+
+ return bfr;
}
//////////////////////////////////////////////////////////////////////////////
void
OMCClpdSvrConnection::run()
{
- LoggerRef logger = m_pServer->getEnv()->getLogger(COMPONENT_NAME);
+ LoggerRef logger = m_pServer->getEnv()->getLogger(COMPONENT_NAME);
- OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run entered");
+ OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run entered");
- SelectTypeArray selArray;
- selArray.push_back(m_upipe->getSelectObj());
- selArray.push_back(m_socket.getSelectObj());
+ SelectTypeArray selArray;
+ selArray.push_back(m_upipe->getSelectObj());
+ selArray.push_back(m_socket.getSelectObj());
- // Get input & output streams from socket
- std::istream& sistr(m_socket.getInputStream());
- std::ostream& sostr(m_socket.getOutputStream());
+ // Get input & output streams from socket
+ std::istream& sistr(m_socket.getInputStream());
+ std::ostream& sostr(m_socket.getOutputStream());
- // Get timeout value
- String item = m_pServer->getEnv()->getConfigItem(
- OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT);
- Int32 timeout = item.toInt32();
+ // Get timeout value
+ String item = m_pServer->getEnv()->getConfigItem(
+ OMCClpdConfigOpts::SERVER_TIMEOUT_opt, OMCCLPD_DEFAULT_SERVER_TIMEOUT);
+ Int32 timeout = item.toInt32();
OMCCLPProgramRef clpref(new OMCCLPDaemon(sostr));
clpref->setLogger(logger);
@@ -158,105 +155,89 @@
{
setCLPSession(clpref);
- try
- {
- bool firstLine = true;
+ try
+ {
+ String line;
- while (sistr.good())
- {
- if (!firstLine)
- {
- String line = getLine(sistr);
- OW_LOG_DEBUG(logger,
- Format("OMCClpdSvrConnection received line: %1", line));
+ while (sistr.good())
+ {
+ line.erase();
- if (!line.empty()) {
- clpref->runCommand(line);
- sostr.flush();
- }
-
- if (clpref->shouldExit())
- {
- line = "Good-bye :-)";
- sostr << line << "\r\n";
- sostr.flush();
- break;
- }
- }
- else
- firstLine = false;
-
/* Send the prompt to the client */
sostr << "\r\n"CLPPROMPT;
sostr.flush();
-
- // only select if the buffer is empty
- if (sistr.rdbuf()->in_avail() == 0)
- {
- int selType = Select::SELECT_INTERRUPTED;
- while(selType == Select::SELECT_INTERRUPTED)
- {
- selType = Select::select(selArray, timeout * 1000); // *1000 to convert seconds to milliseconds
- }
-
- if (selType == Select::SELECT_ERROR)
- {
- OW_THROW(SocketException, "Error occurred during select()");
- }
- if (selType == Select::SELECT_TIMEOUT)
- {
- OW_LOG_INFO(logger, "Client connection timed out");
- return;
- }
- if (selType == 0) // Unnamped pipe/event selected
- {
- OW_LOG_DEBUG(logger, "Server is shutting down. Closing connection");
- return;
- }
- }
- else
- {
- // check for server shutting down message.
- int selType = Select::select(selArray, 0); // 0 so we don't block
- if (selType == 0) // Unnamped pipe/event selected
- {
- OW_LOG_DEBUG(logger,
- "Server is shutting down. Closing connection");
- return;
- }
- }
- } // while (sistr.good())
+ int selType = Select::SELECT_INTERRUPTED;
+ while(selType == Select::SELECT_INTERRUPTED)
+ {
+ selType = Select::select(selArray, timeout * 1000); // *1000 to convert seconds to milliseconds
+ }
+
+ if (selType == Select::SELECT_ERROR)
+ {
+ OW_THROW(SocketException, "Error occurred during select()");
+ }
+ if (selType == Select::SELECT_TIMEOUT)
+ {
+ OW_LOG_INFO(logger, "Client connection timed out");
+ break;
+ }
+ if (selType == 0) // Unnamped pipe/event selected
+ {
+ OW_LOG_DEBUG(logger, "Server is shutting down. Closing connection");
+ break;
+ }
+ else if (selType == 1)
+ {
+ line = getLine(sistr);
+ }
+
+ if (line.length()) {
+ OW_LOG_DEBUG(logger,
+ Format("OMCClpdSvrConnection received line: %1", line));
+ clpref->runCommand(line);
+ sostr.flush();
+ }
+
+ if (clpref->shouldExit())
+ {
+ line = "Good-bye :-)";
+ sostr << line << "\r\n";
+ sostr.flush();
+ break;
+ }
+ } // while (sistr.good())
+
clpref->destroyCLPSessionInfo();
- } // try
- catch (Exception& e)
- {
- OW_LOG_ERROR(logger, Format("%1", e));
- }
- catch (std::ios_base::failure& e)
- {
- // This happens if the socket is closed, so we don't
- //have to do anything.
- OW_LOG_DEBUG(logger, "Caught std::ios_base::failure, "
- "client has closed the connection");
- }
- catch (std::exception& e)
- {
- OW_LOG_ERROR(logger, Format("Caught std::exception (%1) "
- "in OMCClpdSvrConnection::run()", e.what()));
- }
- catch (ThreadCancelledException&)
- {
- OW_LOG_ERROR(logger, "Got Thread Cancelled Exception in "
- "OMCClpdSvrConnection::run()");
- throw;
- }
- catch (...)
- {
- OW_LOG_ERROR(logger, "Got Unknown Exception in "
- "OMCClpdSvrConnection::run()");
- }
+ } // try
+ catch (Exception& e)
+ {
+ OW_LOG_ERROR(logger, Format("%1", e));
+ }
+ catch (std::ios_base::failure& e)
+ {
+ // This happens if the socket is closed, so we don't
+ //have to do anything.
+ OW_LOG_DEBUG(logger, "Caught std::ios_base::failure, "
+ "client has closed the connection");
+ }
+ catch (std::exception& e)
+ {
+ OW_LOG_ERROR(logger, Format("Caught std::exception (%1) "
+ "in OMCClpdSvrConnection::run()", e.what()));
+ }
+ catch (ThreadCancelledException&)
+ {
+ OW_LOG_ERROR(logger, "Got Thread Cancelled Exception in "
+ "OMCClpdSvrConnection::run()");
+ throw;
+ }
+ catch (...)
+ {
+ OW_LOG_ERROR(logger, "Got Unknown Exception in "
+ "OMCClpdSvrConnection::run()");
+ }
}
else
{
@@ -264,23 +245,23 @@
"OMCClpdSvrConnection::run()");
}
- OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run exiting");
+ OW_LOG_DEBUG(logger, "OMCClpdSvrConnection::run exiting");
}
//////////////////////////////////////////////////////////////////////////////
String
OMCClpdSvrConnection::getHostName()
{
- //return m_socket.getLocalAddress().getName();
- return SocketAddress::getAnyLocalHost().getName();
+ //return m_socket.getLocalAddress().getName();
+ return SocketAddress::getAnyLocalHost().getName();
}
//////////////////////////////////////////////////////////////////////////////
void
OMCClpdSvrConnection::doCooperativeCancel()
{
- m_shutdown = true;
- m_socket.disconnect();
+ m_shutdown = true;
+ m_socket.disconnect();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-12 21:33:32
|
Revision: 422
http://svn.sourceforge.net/omc/?rev=422&view=rev
Author: bnicholes
Date: 2006-12-12 13:33:29 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
Make the display method of the omcclpcommand class obey the default output format
Modified Paths:
--------------
clp/trunk/src/omcclpcommand.cpp
Modified: clp/trunk/src/omcclpcommand.cpp
===================================================================
--- clp/trunk/src/omcclpcommand.cpp 2006-12-12 17:23:19 UTC (rev 421)
+++ clp/trunk/src/omcclpcommand.cpp 2006-12-12 21:33:29 UTC (rev 422)
@@ -650,8 +650,13 @@
OMCCLPProgram* clpSession = getCLPSession();
std::ostream& clpout(clpSession->clpout());
- displayHeader(OUTPUT_DISPLAY_TEXT);
+ /* Get any output format option information from the
+ command object. This should have been put here during
+ the parsing phase. */
+ Int32 optArg = getOptionValueInt(E_OPT_OUTPUT, E_SUBOPT_FORMAT);
+ displayHeader(optArg);
+
if (!getErrMessage().empty())
{
clpout << getErrMessage();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-12 17:24:01
|
Revision: 421
http://svn.sourceforge.net/omc/?rev=421&view=rev
Author: bnicholes
Date: 2006-12-12 09:23:19 -0800 (Tue, 12 Dec 2006)
Log Message:
-----------
Fix the CLP prompt to conform to the spec. The prompt should be -><space>
Modified Paths:
--------------
clp/trunk/src/omcclpc.cpp
clp/trunk/src/omcclpc.h
clp/trunk/src/omcclpcommon.h
clp/trunk/src/omcclpdsvrconnection.cpp
Modified: clp/trunk/src/omcclpc.cpp
===================================================================
--- clp/trunk/src/omcclpc.cpp 2006-12-11 23:33:10 UTC (rev 420)
+++ clp/trunk/src/omcclpc.cpp 2006-12-12 17:23:19 UTC (rev 421)
@@ -309,7 +309,7 @@
int count = 0;
/* Wait for the prompt from the server */
- while (!prompt.endsWith("-->") && (count < 10))
+ while (!prompt.endsWith(PROMPT) && (count < 10))
{
if (m_socket.waitForInput(1))
{
@@ -351,8 +351,8 @@
{
String UFiP(0);
- /* We need to get the session UFiP from the CLP server.
- Send the command to get the session UFiP */
+ /* We need to make sure that the 'session' reserved target
+ exists so that we can use it when needed */
String cmd = "show -o format=keyword session";
m_socket.write(cmd.c_str(), cmd.length());
m_socket.write("\r\n", 2);
Modified: clp/trunk/src/omcclpc.h
===================================================================
--- clp/trunk/src/omcclpc.h 2006-12-11 23:33:10 UTC (rev 420)
+++ clp/trunk/src/omcclpc.h 2006-12-12 17:23:19 UTC (rev 421)
@@ -77,7 +77,7 @@
void doExit();
void shutdown();
String getServerPrompt();
- bool isValidPrompt (String prompt) {prompt.endsWith("-->");}
+ bool isValidPrompt (String prompt) {prompt.endsWith(PROMPT);}
bool socketConnect();
void createLogger();
Modified: clp/trunk/src/omcclpcommon.h
===================================================================
--- clp/trunk/src/omcclpcommon.h 2006-12-11 23:33:10 UTC (rev 420)
+++ clp/trunk/src/omcclpcommon.h 2006-12-12 17:23:19 UTC (rev 421)
@@ -61,6 +61,8 @@
s = s.substring(0,s.length()-1); }
#define CLPENDL "\r\n"
+#define PROMPT "-> "
+#define CLPPROMPT "CLP"PROMPT
namespace OMCCLP {
Modified: clp/trunk/src/omcclpdsvrconnection.cpp
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-11 23:33:10 UTC (rev 420)
+++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-12 17:23:19 UTC (rev 421)
@@ -187,7 +187,7 @@
firstLine = false;
/* Send the prompt to the client */
- sostr << "\r\nCLP-->";
+ sostr << "\r\n"CLPPROMPT;
sostr.flush();
// only select if the buffer is empty
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2006-12-11 23:33:11
|
Revision: 420
http://svn.sourceforge.net/omc/?rev=420&view=rev
Author: npaxton
Date: 2006-12-11 15:33:10 -0800 (Mon, 11 Dec 2006)
Log Message:
-----------
some fixes to spec and Makefile to help find config files, etc
Modified Paths:
--------------
clp/trunk/configure.ac
clp/trunk/src/Makefile.am
clp/trunk/src/spec/omcclp.spec
Modified: clp/trunk/configure.ac
===================================================================
--- clp/trunk/configure.ac 2006-12-08 23:08:19 UTC (rev 419)
+++ clp/trunk/configure.ac 2006-12-11 23:33:10 UTC (rev 420)
@@ -2,7 +2,7 @@
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(omcclp, 0.5)
+AM_INIT_AUTOMAKE(omcclp, 0.7)
AC_LANG_CPLUSPLUS
AC_PROG_CXX
Modified: clp/trunk/src/Makefile.am
===================================================================
--- clp/trunk/src/Makefile.am 2006-12-08 23:08:19 UTC (rev 419)
+++ clp/trunk/src/Makefile.am 2006-12-11 23:33:10 UTC (rev 420)
@@ -95,12 +95,13 @@
stlini.cpp stlini.h \
version.h
-dist_omcclp_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini
-dist_omcclpd_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini
-dist_omcclpc_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini
-omcclpdir = $(sysconfdir)/omcclp
-omcclpddir = $(sysconfdir)/omcclpd
-omcclpcdir = $(sysconfdir)/omcclpc
+dist_omcclp_DATA = omcclpaddr.ini oemextensions.ini omcclphelp.ini omcclpd.conf
+#dist_omcclp_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini
+#dist_omcclpd_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini
+#dist_omcclpc_DATA = omcclpd.conf omcclpaddr.ini oemextensions.ini omcclphelp.ini
+omcclpdir = $(sysconfdir)
+#omcclpddir = $(sysconfdir)
+#omcclpcdir = $(sysconfdir)
# set the include path found by configure
INCLUDES= $(all_includes) \
Modified: clp/trunk/src/spec/omcclp.spec
===================================================================
--- clp/trunk/src/spec/omcclp.spec 2006-12-08 23:08:19 UTC (rev 419)
+++ clp/trunk/src/spec/omcclp.spec 2006-12-11 23:33:10 UTC (rev 420)
@@ -1,11 +1,12 @@
Summary: Implementation of the SMCLP specification
-Name: smclp
+Name: omcclp
BuildRequires: gcc-c++ openwbem-devel openssl-devel readline-devel
-Version: 0.1
+Version: 0.7
Release: 1
-Copyright: Novell Inc.
+#Copyright: Novell Inc.
+License: Novell, Inc.
Group: SMASH Applications
-Source: omcclp-0.1.tar.gz
+Source: omcclp-0.7.tar.gz
URL: https://svn.innerweb.novell.com/svn/novlclp/trunk/omcclp
Distribution: SUSE Linux
Packager: Brad Nicholes <bni...@no...>
@@ -17,18 +18,26 @@
%setup
%build
-./configure --prefix=/usr --sysconfdir=/etc
+./configure --prefix=/usr --sysconfdir=/etc/omcclp --enable-debug-mode
make
%install
make install
+install /etc/omcclp/omcclpd.conf $BUILD_ROOT_DIR/etc/omcclp/omcclpc.conf
+install /etc/omcclp/omcclpd.conf $BUILD_ROOT_DIR/etc/omcclp/omcclp.conf
%files
%dir /etc/omcclp
%config /etc/omcclp/omcclp.conf
+%config /etc/omcclp/omcclpc.conf
+%config /etc/omcclp/omcclpd.conf
%config /etc/omcclp/omcclpaddr.ini
+%config /etc/omcclp/oemextensions.ini
+%config /etc/omcclp/omcclphelp.ini
+
/usr/bin/omcclp
+/usr/bin/omcclpc
+/usr/sbin/omcclpd
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-08 23:08:18
|
Revision: 419
http://svn.sourceforge.net/omc/?rev=419&view=rev
Author: bnicholes
Date: 2006-12-08 15:08:19 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
Fix a typo with COMMAND COMPLETED
Modified Paths:
--------------
clp/trunk/src/omcclpcmdalias.cpp
clp/trunk/src/omcclpcmdcd.cpp
clp/trunk/src/omcclpcmdcreate.cpp
clp/trunk/src/omcclpcmddelete.cpp
clp/trunk/src/omcclpcmddump.cpp
clp/trunk/src/omcclpcmdexit.cpp
clp/trunk/src/omcclpcmdhelp.cpp
clp/trunk/src/omcclpcmdload.cpp
clp/trunk/src/omcclpcmdreset.cpp
clp/trunk/src/omcclpcmdset.cpp
clp/trunk/src/omcclpcmdshow.cpp
clp/trunk/src/omcclpcmdstart.cpp
clp/trunk/src/omcclpcmdstop.cpp
clp/trunk/src/omcclpcmdversion.cpp
clp/trunk/src/omcclpcommandstatus.cpp
clp/trunk/src/omcclpcommandstatus.h
Modified: clp/trunk/src/omcclpcmdalias.cpp
===================================================================
--- clp/trunk/src/omcclpcmdalias.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdalias.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -120,7 +120,7 @@
conf->SaveConfigurationFile();
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdcd.cpp
===================================================================
--- clp/trunk/src/omcclpcmdcd.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdcd.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -107,7 +107,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdcreate.cpp
===================================================================
--- clp/trunk/src/omcclpcmdcreate.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdcreate.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -172,7 +172,7 @@
try
{
CIMValue cv = cc->invokeMethod (invokeCop, methodName, inParams, outParams);
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
catch ( CIMException& ce )
@@ -198,7 +198,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmddelete.cpp
===================================================================
--- clp/trunk/src/omcclpcmddelete.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmddelete.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -175,7 +175,7 @@
if (ret)
{
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
}
else
{
Modified: clp/trunk/src/omcclpcmddump.cpp
===================================================================
--- clp/trunk/src/omcclpcmddump.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmddump.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -50,7 +50,7 @@
/*XXX Not implemented yet */
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdexit.cpp
===================================================================
--- clp/trunk/src/omcclpcmdexit.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdexit.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -51,7 +51,7 @@
/* Set the exit flag in the main program object */
clpSession->doExit();
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdhelp.cpp
===================================================================
--- clp/trunk/src/omcclpcmdhelp.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdhelp.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -59,7 +59,7 @@
{
/* Nothing to execute for the help command */
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdload.cpp
===================================================================
--- clp/trunk/src/omcclpcmdload.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdload.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -51,7 +51,7 @@
/*XXX Not yet implemented */
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdreset.cpp
===================================================================
--- clp/trunk/src/omcclpcmdreset.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdreset.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -136,7 +136,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdset.cpp
===================================================================
--- clp/trunk/src/omcclpcmdset.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdset.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -188,7 +188,7 @@
}
else
{
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
ret = true;
}
}
@@ -279,7 +279,7 @@
}
else
{
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
ret = true;
}
}
Modified: clp/trunk/src/omcclpcmdshow.cpp
===================================================================
--- clp/trunk/src/omcclpcmdshow.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdshow.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -419,7 +419,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdstart.cpp
===================================================================
--- clp/trunk/src/omcclpcmdstart.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdstart.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -136,7 +136,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdstop.cpp
===================================================================
--- clp/trunk/src/omcclpcmdstop.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdstop.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -138,7 +138,7 @@
return false;
}
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcmdversion.cpp
===================================================================
--- clp/trunk/src/omcclpcmdversion.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcmdversion.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -49,7 +49,7 @@
{
// XXX we may need to get the version from the
// CLP service running in the CIMOM.
- getCmdStatusRef()->setStatus(COMMAND_COMPLETE);
+ getCmdStatusRef()->setStatus(COMMAND_COMPLETED);
return true;
}
Modified: clp/trunk/src/omcclpcommandstatus.cpp
===================================================================
--- clp/trunk/src/omcclpcommandstatus.cpp 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcommandstatus.cpp 2006-12-08 23:08:19 UTC (rev 419)
@@ -35,7 +35,7 @@
} cmdmsg;
static cmdmsg cmdstatus[] = {
- {COMMAND_COMPLETE, "COMMAND COMPLETE"},
+ {COMMAND_COMPLETED, "COMMAND COMPLETED"},
{COMMAND_SPAWNED, "COMMAND SPAWNED"},
{COMMAND_PROCESSING_FAILED, "COMMAND PROCESSING FAILED"},
{COMMAND_EXECUTION_FAILED, "COMMAND EXECUTION FAILED"},
Modified: clp/trunk/src/omcclpcommandstatus.h
===================================================================
--- clp/trunk/src/omcclpcommandstatus.h 2006-12-08 22:45:14 UTC (rev 418)
+++ clp/trunk/src/omcclpcommandstatus.h 2006-12-08 23:08:19 UTC (rev 419)
@@ -39,7 +39,7 @@
namespace OMCCLP {
// Command Status values
-#define COMMAND_COMPLETE 0
+#define COMMAND_COMPLETED 0
#define COMMAND_SPAWNED 1
#define COMMAND_PROCESSING_FAILED 2
#define COMMAND_EXECUTION_FAILED 3
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-08 22:45:20
|
Revision: 418
http://svn.sourceforge.net/omc/?rev=418&view=rev
Author: bnicholes
Date: 2006-12-08 14:45:14 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
Allow the value map values on a set command to be resolved before passing them to the cimom
Modified Paths:
--------------
clp/trunk/src/omcclpcmdmapping.cpp
clp/trunk/src/omcclpcmdmapping.h
Modified: clp/trunk/src/omcclpcmdmapping.cpp
===================================================================
--- clp/trunk/src/omcclpcmdmapping.cpp 2006-12-08 22:43:44 UTC (rev 417)
+++ clp/trunk/src/omcclpcmdmapping.cpp 2006-12-08 22:45:14 UTC (rev 418)
@@ -25,7 +25,7 @@
#ifdef HAVE_CONFIG_H
- #include <config.h>
+ #include <config.h>
#endif
#include "omcclpprogram.h"
@@ -48,33 +48,33 @@
*/
CIMValue SMCmdMapping::smRequestStateChange (const CIMObjectPath& cop, Int32 reqState)
{
- m_methodToCall = m_methodCalled = "RequestStateChange";
- m_cimObjectPath = cop;
+ m_methodToCall = m_methodCalled = "RequestStateChange";
+ m_cimObjectPath = cop;
- try
- {
- /* Push the parameters on the input parameter array. */
- /*XXX For now we aren't going to worry about the timeoutperiod.
- That will come later */
- m_inParams.push_back(CIMParamValue("RequestedState", CIMValue(UInt16(reqState))));
- m_inParams.push_back(CIMParamValue("TimeoutPeriod", CIMValue(CIMDateTime(0))));
+ try
+ {
+ /* Push the parameters on the input parameter array. */
+ /*XXX For now we aren't going to worry about the timeoutperiod.
+ That will come later */
+ m_inParams.push_back(CIMParamValue("RequestedState", CIMValue(UInt16(reqState))));
+ m_inParams.push_back(CIMParamValue("TimeoutPeriod", CIMValue(CIMDateTime(0))));
- /*XXX The out paramenter should be checked for a job object, but that will come later */
+ /*XXX The out paramenter should be checked for a job object, but that will come later */
- m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, m_inParams, m_outParams);
- }
- catch (const CIMException& ce)
- {
- cerr << ce << CLPENDL;
- m_returnValue = CIMValue(2u);
- m_errorMsg = String(ce.getDescription());
- }
- catch (Exception& e)
- {
- cerr << e << CLPENDL;
- }
+ m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall, m_inParams, m_outParams);
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ m_returnValue = CIMValue(2u);
+ m_errorMsg = String(ce.getDescription());
+ }
+ catch (Exception& e)
+ {
+ cerr << e << CLPENDL;
+ }
- return m_returnValue;
+ return m_returnValue;
}
/**
@@ -82,8 +82,8 @@
*/
CIMValue SMCmdMapping::smResetRSC (const CIMObjectPath& cop)
{
- // Send a reset which evaluates to id 11
- return smRequestStateChange (cop, 11);
+ // Send a reset which evaluates to id 11
+ return smRequestStateChange (cop, 11);
}
/**
@@ -91,8 +91,8 @@
*/
CIMValue SMCmdMapping::smStartRSC (const CIMObjectPath& cop)
{
- // Send a Enabled which evaluates to id 2
- return smRequestStateChange (cop, 2);
+ // Send a Enabled which evaluates to id 2
+ return smRequestStateChange (cop, 2);
}
/**
@@ -100,8 +100,8 @@
*/
CIMValue SMCmdMapping::smStopRSC (const CIMObjectPath& cop)
{
- // Send a Disabled which evaluates to id 3
- return smRequestStateChange (cop, 3);
+ // Send a Disabled which evaluates to id 3
+ return smRequestStateChange (cop, 3);
}
/**
@@ -110,7 +110,7 @@
*/
CIMValue SMCmdMapping::smOpDeleteInstance (const CIMObjectPath& cop)
{
- m_returnValue = CIMValue(0u);
+ m_returnValue = CIMValue(0u);
try
{
@@ -145,15 +145,15 @@
}
catch (const CIMException& ce)
{
- m_errorMsg = String(ce.getDescription());
- /*XXX Need to specify a real error value here */
- m_returnValue = CIMValue(2u);
+ m_errorMsg = String(ce.getDescription());
+ /*XXX Need to specify a real error value here */
+ m_returnValue = CIMValue(2u);
}
catch (Exception& e)
{
- m_errorMsg = String(e.getMessage());
- /*XXX Need to specify a real error value here */
- m_returnValue = CIMValue(2u);
+ m_errorMsg = String(e.getMessage());
+ /*XXX Need to specify a real error value here */
+ m_returnValue = CIMValue(2u);
}
return m_returnValue;
@@ -165,35 +165,39 @@
*/
CIMValue SMCmdMapping::smModifyInstance (const CIMObjectPath& cop)
{
- m_returnValue = CIMValue(0u);
+ m_returnValue = CIMValue(0u);
- CIMInstance ci;
- try
- {
- ci = m_cimClient->getInstance(cop);
- }
- catch (const CIMException& ce)
- {
- cerr << ce << CLPENDL;
- /*XXX Need to specify a real error value here */
- m_returnValue = CIMValue(2u);
- }
+ CIMInstance ci;
+ try
+ {
+ ci = m_cimClient->getInstance(cop, WBEMFlags::E_NOT_LOCAL_ONLY,
+ WBEMFlags::E_INCLUDE_QUALIFIERS);
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ /*XXX Need to specify a real error value here */
+ m_returnValue = CIMValue(2u);
+ }
- for (int i=0;i<m_property_names.size();i++)
- {
- ci.updatePropertyValue(m_property_names[i], m_property_values[i]);
- }
- try
- {
- m_cimClient->modifyInstance(ci, WBEMFlags::E_EXCLUDE_QUALIFIERS, &m_property_names);
- }
- catch (const CIMException& ce)
- {
- m_returnValue = CIMValue((UInt32)ce.getErrNo());
- m_errorMsg = String(ce.getDescription());
- }
+ for (int i=0;i<m_property_names.size();i++)
+ {
+ CIMProperty cprop = ci.getProperty(CIMName(m_property_names[i]));
+ CIMValue cv = resolveMappedValue(cprop, m_property_values[i].toString());
- return m_returnValue;
+ ci.updatePropertyValue(m_property_names[i], cv);
+ }
+ try
+ {
+ m_cimClient->modifyInstance(ci, WBEMFlags::E_EXCLUDE_QUALIFIERS, &m_property_names);
+ }
+ catch (const CIMException& ce)
+ {
+ m_returnValue = CIMValue((UInt32)ce.getErrNo());
+ m_errorMsg = String(ce.getDescription());
+ }
+
+ return m_returnValue;
}
/**
@@ -203,26 +207,26 @@
*/
CIMValue SMCmdMapping::smInvokeMethod (const CIMObjectPath& cop)
{
- m_cimObjectPath = cop;
+ m_cimObjectPath = cop;
- try
- {
- m_methodCalled = m_methodToCall;
- m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall,
- m_inParams, m_outParams);
- }
- catch (const CIMException& ce)
- {
- cerr << ce << CLPENDL;
- m_returnValue = CIMValue((UInt32)-1);
- m_errorMsg = String(ce.getDescription());
- }
- catch (Exception& e)
- {
- cerr << e << CLPENDL;
- }
+ try
+ {
+ m_methodCalled = m_methodToCall;
+ m_returnValue = m_cimClient->invokeMethod (m_cimObjectPath, m_methodToCall,
+ m_inParams, m_outParams);
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ m_returnValue = CIMValue((UInt32)-1);
+ m_errorMsg = String(ce.getDescription());
+ }
+ catch (Exception& e)
+ {
+ cerr << e << CLPENDL;
+ }
- return m_returnValue;
+ return m_returnValue;
}
/**
@@ -231,8 +235,8 @@
*/
void SMCmdMapping::setProperty (const String name, const CIMValue value)
{
- m_property_names.push_back(name);
- m_property_values.push_back(value);
+ m_property_names.push_back(name);
+ m_property_values.push_back(value);
}
/**
@@ -241,144 +245,279 @@
* val - String value to be converted to the correct type and
* set
*/
+CIMValue SMCmdMapping::resolveMappedValue (const CIMProperty prop, const String val)
+{
+ CIMValue cv(val);
+
+ try
+ {
+ switch (prop.getDataType().getType())
+ {
+ case CIMDataType::UINT8:
+ try
+ {
+ cv = CIMValue(val.toUInt8());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toUInt8());
+ }
+ break;
+ case CIMDataType::SINT8:
+ try
+ {
+ cv = CIMValue(val.toInt8());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toInt8());
+ }
+ break;
+ case CIMDataType::UINT16:
+ try
+ {
+ cv = CIMValue(val.toUInt16());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toUInt16());
+ }
+ break;
+ case CIMDataType::SINT16:
+ try
+ {
+ cv = CIMValue(val.toInt16());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toInt16());
+ }
+ break;
+ case CIMDataType::UINT32:
+ try
+ {
+ cv = CIMValue(val.toUInt32());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toUInt32());
+ }
+ break;
+ case CIMDataType::SINT32:
+ try
+ {
+ cv = CIMValue(val.toInt32());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toInt32());
+ }
+ break;
+ case CIMDataType::UINT64:
+ try
+ {
+ cv = CIMValue(val.toUInt64());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toUInt64());
+ }
+ break;
+ case CIMDataType::SINT64:
+ try
+ {
+ cv = CIMValue(val.toInt64());
+ }
+ catch (Exception& e)
+ {
+ String v = getPropertyMappedValue(prop,val);
+ cv = CIMValue(v.toInt64());
+ }
+ break;
+ case CIMDataType::BOOLEAN:
+ cv = CIMValue(val.toBool());
+ break;
+ case CIMDataType::REAL32:
+ cv = CIMValue(val.toReal32());
+ break;
+ case CIMDataType::REAL64:
+ cv = CIMValue(val.toReal64());
+ break;
+ // case CIMDataType::DATETIME:
+ // cv = CIMValue(val.toDateTime());
+ // break;
+ // case CIMDataType::CHAR16:
+ // cv = CIMValue(val.toChar16());
+ // break;
+ }
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ m_returnValue = CIMValue((UInt32)-1);
+ m_errorMsg = String("Invalid property type ");
+ cv = CIMValue(val);
+ }
+ catch (Exception& e)
+ {
+ cerr << e << CLPENDL;
+ cv = CIMValue(val);
+ }
+
+ return cv;
+}
+
+/**
+* Set an IN parameter for a method that will be invoked
+* param - String name of the parameter
+* val - String value to be converted to the correct type and
+* set
+*/
bool SMCmdMapping::setInParamValue (String param, String val)
{
- String paramName;
- bool ret = true;
+ String paramName;
+ bool ret = true;
- try
- {
- for (int i=0; i<m_inParamsDesc.size(); i++)
- {
- paramName = m_inParamsDesc[i].getName();
- if (param.equalsIgnoreCase(paramName))
- {
- CIMValue cv(val);
- switch (m_inParamsDesc[i].getType().getType())
- {
- case CIMDataType::UINT8:
- try
- {
- cv = CIMValue(val.toUInt8());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toUInt8());
- }
- break;
- case CIMDataType::SINT8:
- try
- {
- cv = CIMValue(val.toInt8());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toInt8());
- }
- break;
- case CIMDataType::UINT16:
- try
- {
- cv = CIMValue(val.toUInt16());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toUInt16());
- }
- break;
- case CIMDataType::SINT16:
- try
- {
- cv = CIMValue(val.toInt16());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toInt16());
- }
- break;
- case CIMDataType::UINT32:
- try
- {
- cv = CIMValue(val.toUInt32());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toUInt32());
- }
- break;
- case CIMDataType::SINT32:
- try
- {
- cv = CIMValue(val.toInt32());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toInt32());
- }
- break;
- case CIMDataType::UINT64:
- try
- {
- cv = CIMValue(val.toUInt64());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toUInt64());
- }
- break;
- case CIMDataType::SINT64:
- try
- {
- cv = CIMValue(val.toInt64());
- }
- catch (Exception& e)
- {
- String v = getParameterMappedValue(m_inParamsDesc[i],val);
- cv = CIMValue(v.toInt64());
- }
- break;
- case CIMDataType::BOOLEAN:
- cv = CIMValue(val.toBool());
- break;
- case CIMDataType::REAL32:
- cv = CIMValue(val.toReal32());
- break;
- case CIMDataType::REAL64:
- cv = CIMValue(val.toReal64());
- break;
+ try
+ {
+ for (int i=0; i<m_inParamsDesc.size(); i++)
+ {
+ paramName = m_inParamsDesc[i].getName();
+ if (param.equalsIgnoreCase(paramName))
+ {
+ CIMValue cv(val);
+ switch (m_inParamsDesc[i].getType().getType())
+ {
+ case CIMDataType::UINT8:
+ try
+ {
+ cv = CIMValue(val.toUInt8());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toUInt8());
+ }
+ break;
+ case CIMDataType::SINT8:
+ try
+ {
+ cv = CIMValue(val.toInt8());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toInt8());
+ }
+ break;
+ case CIMDataType::UINT16:
+ try
+ {
+ cv = CIMValue(val.toUInt16());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toUInt16());
+ }
+ break;
+ case CIMDataType::SINT16:
+ try
+ {
+ cv = CIMValue(val.toInt16());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toInt16());
+ }
+ break;
+ case CIMDataType::UINT32:
+ try
+ {
+ cv = CIMValue(val.toUInt32());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toUInt32());
+ }
+ break;
+ case CIMDataType::SINT32:
+ try
+ {
+ cv = CIMValue(val.toInt32());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toInt32());
+ }
+ break;
+ case CIMDataType::UINT64:
+ try
+ {
+ cv = CIMValue(val.toUInt64());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toUInt64());
+ }
+ break;
+ case CIMDataType::SINT64:
+ try
+ {
+ cv = CIMValue(val.toInt64());
+ }
+ catch (Exception& e)
+ {
+ String v = getParameterMappedValue(m_inParamsDesc[i],val);
+ cv = CIMValue(v.toInt64());
+ }
+ break;
+ case CIMDataType::BOOLEAN:
+ cv = CIMValue(val.toBool());
+ break;
+ case CIMDataType::REAL32:
+ cv = CIMValue(val.toReal32());
+ break;
+ case CIMDataType::REAL64:
+ cv = CIMValue(val.toReal64());
+ break;
// case CIMDataType::DATETIME:
// cv = CIMValue(val.toDateTime());
// break;
// case CIMDataType::CHAR16:
// cv = CIMValue(val.toChar16());
// break;
- }
+ }
- setInParamValue(CIMParamValue(paramName, cv));
- break;
- }
- }
- }
- catch (const CIMException& ce)
- {
- cerr << ce << CLPENDL;
- m_returnValue = CIMValue((UInt32)-1);
- m_errorMsg = String("Invalid parameter for method ") + paramName;
- ret = false;
- }
- catch (Exception& e)
- {
- cerr << e << CLPENDL;
- ret = false;
- }
- return ret;
+ setInParamValue(CIMParamValue(paramName, cv));
+ break;
+ }
+ }
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ m_returnValue = CIMValue((UInt32)-1);
+ m_errorMsg = String("Invalid parameter for method ") + paramName;
+ ret = false;
+ }
+ catch (Exception& e)
+ {
+ cerr << e << CLPENDL;
+ ret = false;
+ }
+ return ret;
}
/**
@@ -389,58 +528,58 @@
*/
bool SMCmdMapping::setMethodToCall(String cmd)
{
- String params;
- bool ret = true;
+ String params;
+ bool ret = true;
- /* Parse the method invocation string for the class name,
- method name and parameters. */
- try
- {
- Int32 idxStart = 0;
- Int32 idxEnd = cmd.indexOf('.');
- m_methodClassName = cmd.substring(idxStart, idxEnd);
+ /* Parse the method invocation string for the class name,
+ method name and parameters. */
+ try
+ {
+ Int32 idxStart = 0;
+ Int32 idxEnd = cmd.indexOf('.');
+ m_methodClassName = cmd.substring(idxStart, idxEnd);
- idxStart = idxStart+idxEnd+1;
- idxEnd = cmd.indexOf('(', idxStart) - idxStart;
- m_methodToCall = cmd.substring(idxStart, idxEnd);
+ idxStart = idxStart+idxEnd+1;
+ idxEnd = cmd.indexOf('(', idxStart) - idxStart;
+ m_methodToCall = cmd.substring(idxStart, idxEnd);
- idxStart = idxStart+idxEnd+1;
- idxEnd = cmd.indexOf(')', idxStart) - idxStart;
- params = cmd.substring(idxStart, idxEnd);
- }
- catch (const CIMException& ce)
- {
- cerr << ce << CLPENDL;
- m_returnValue = CIMValue((UInt32)-1);
- m_errorMsg = String("Invalid method invocation string");
- ret = false;
- }
- catch (Exception& e)
- {
- cerr << e << CLPENDL;
- ret = false;
- }
+ idxStart = idxStart+idxEnd+1;
+ idxEnd = cmd.indexOf(')', idxStart) - idxStart;
+ params = cmd.substring(idxStart, idxEnd);
+ }
+ catch (const CIMException& ce)
+ {
+ cerr << ce << CLPENDL;
+ m_returnValue = CIMValue((UInt32)-1);
+ m_errorMsg = String("Invalid method invocation string");
+ ret = false;
+ }
+ catch (Exception& e)
+ {
+ cerr << e << CLPENDL;
+ ret = false;
+ }
- /* Get the method description from the CIMOM so that it can
- be matched with the actual parameter list. This will
- tell us if everything lines up for the method call. */
- CIMClass cimCls = m_cimClient->getClass(m_methodClassName, E_NOT_LOCAL_ONLY,
- E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN);
- CIMMethod cimMthd = cimCls.getMethod(m_methodToCall);
+ /* Get the method description from the CIMOM so that it can
+ be matched with the actual parameter list. This will
+ tell us if everything lines up for the method call. */
+ CIMClass cimCls = m_cimClient->getClass(m_methodClassName, E_NOT_LOCAL_ONLY,
+ E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN);
+ CIMMethod cimMthd = cimCls.getMethod(m_methodToCall);
- if (cimMthd)
- {
- m_inParamsDesc = cimMthd.getINParameters();
- m_outParamsDesc = cimMthd.getOUTParameters();
- }
- else
- {
- m_returnValue = CIMValue((UInt32)-1);
- m_errorMsg = String("Method: ") + m_methodToCall +
- String("doesn't exist for class ") + m_methodClassName;
- ret = false;
- }
- return ret;
+ if (cimMthd)
+ {
+ m_inParamsDesc = cimMthd.getINParameters();
+ m_outParamsDesc = cimMthd.getOUTParameters();
+ }
+ else
+ {
+ m_returnValue = CIMValue((UInt32)-1);
+ m_errorMsg = String("Method: ") + m_methodToCall +
+ String("doesn't exist for class ") + m_methodClassName;
+ ret = false;
+ }
+ return ret;
}
/**
@@ -448,43 +587,43 @@
*/
String SMCmdMapping::getReturnValueText()
{
- /* Initialize the return value */
- String msg("");
+ /* Initialize the return value */
+ String msg("");
- /* If we don't have a contained object then bail out */
- if (!m_cimObjectPath)
- return msg;
+ /* If we don't have a contained object then bail out */
+ if (!m_cimObjectPath)
+ return msg;
- /* Get the CIMMethod object for the called method */
- String clsName = m_cimObjectPath.getClassName();
- CIMClass cimCls = m_cimClient->getClass(clsName, E_NOT_LOCAL_ONLY, E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN);
- CIMMethod cimMeth = cimCls.getMethod(m_methodCalled);
+ /* Get the CIMMethod object for the called method */
+ String clsName = m_cimObjectPath.getClassName();
+ CIMClass cimCls = m_cimClient->getClass(clsName, E_NOT_LOCAL_ONLY, E_INCLUDE_QUALIFIERS, E_INCLUDE_CLASS_ORIGIN);
+ CIMMethod cimMeth = cimCls.getMethod(m_methodCalled);
- if (cimMeth)
- {
- /* Get the valueMap and values for the called method */
- String retValue = m_returnValue.toString();
- CIMQualifier returnsMap = cimMeth.getQualifier("ValueMap");
- CIMQualifier returnsMsgs = cimMeth.getQualifier("Values");
- if (returnsMap && returnsMsgs)
- {
- /* Tokenize the string array so that we can match up the return
- value with the value map */
- StringArray returnsMapSA = returnsMap.getValue().toStringArray();
- StringArray returnsMsgsSA = returnsMsgs.getValue().toStringArray();
+ if (cimMeth)
+ {
+ /* Get the valueMap and values for the called method */
+ String retValue = m_returnValue.toString();
+ CIMQualifier returnsMap = cimMeth.getQualifier("ValueMap");
+ CIMQualifier returnsMsgs = cimMeth.getQualifier("Values");
+ if (returnsMap && returnsMsgs)
+ {
+ /* Tokenize the string array so that we can match up the return
+ value with the value map */
+ StringArray returnsMapSA = returnsMap.getValue().toStringArray();
+ StringArray returnsMsgsSA = returnsMsgs.getValue().toStringArray();
- for (int i=0;i<returnsMapSA.size();i++)
- {
- if (retValue.equals(returnsMapSA[i]))
- {
- msg = returnsMsgsSA[i];
- break;
- }
- }
- }
- }
+ for (int i=0;i<returnsMapSA.size();i++)
+ {
+ if (retValue.equals(returnsMapSA[i]))
+ {
+ msg = returnsMsgsSA[i];
+ break;
+ }
+ }
+ }
+ }
- return msg;
+ return msg;
}
/**
@@ -492,34 +631,67 @@
*/
String SMCmdMapping::getParameterMappedValue(CIMParameter param, String val)
{
- /* Initialize the return value */
- String retVal("");
+ /* Initialize the return value */
+ String retVal("");
- /* Get the valueMap and values for the parameter */
- CIMQualifier paramMap = param.getQualifier(CIMName("ValueMap"));
- CIMQualifier paramValues = param.getQualifier(CIMName("Values"));
+ /* Get the valueMap and values for the parameter */
+ CIMQualifier paramMap = param.getQualifier(CIMName("ValueMap"));
+ CIMQualifier paramValues = param.getQualifier(CIMName("Values"));
- if (paramMap && paramValues)
- {
- /* Tokenize the string array so that we can match up the command
- line value with the the value map */
- StringArray paramMapSA = paramMap.getValue().toStringArray();
- StringArray paramValuesSA = paramValues.getValue().toStringArray();
- STRIP_QUOTES(val);
+ if (paramMap && paramValues)
+ {
+ /* Tokenize the string array so that we can match up the command
+ line value with the the value map */
+ StringArray paramMapSA = paramMap.getValue().toStringArray();
+ StringArray paramValuesSA = paramValues.getValue().toStringArray();
+ STRIP_QUOTES(val);
- for (int i=0; i<paramValuesSA.size(); i++)
- {
- if (val.equalsIgnoreCase(paramValuesSA[i]))
- {
- retVal = paramMapSA[i];
- break;
- }
- }
- }
+ for (int i=0; i<paramValuesSA.size(); i++)
+ {
+ if (val.equalsIgnoreCase(paramValuesSA[i]))
+ {
+ retVal = paramMapSA[i];
+ break;
+ }
+ }
+ }
- return retVal;
+ return retVal;
}
+/**
+* Get the mapped value for a property
+*/
+String SMCmdMapping::getPropertyMappedValue(CIMProperty prop, String val)
+{
+ /* Initialize the return value */
+ String retVal("");
+ /* Get the valueMap and values for the parameter */
+ CIMQualifier qualMap = prop.getQualifier(CIMName("ValueMap"));
+ CIMQualifier qualValues = prop.getQualifier(CIMName("Values"));
+
+ if (qualMap && qualValues)
+ {
+ /* Tokenize the string array so that we can match up the command
+ line value with the the value map */
+ StringArray qualMapSA = qualMap.getValue().toStringArray();
+ StringArray qualValuesSA = qualValues.getValue().toStringArray();
+ STRIP_QUOTES(val);
+
+ for (int i=0; i<qualValuesSA.size(); i++)
+ {
+ if (val.equalsIgnoreCase(qualValuesSA[i]))
+ {
+ retVal = qualMapSA[i];
+ break;
+ }
+ }
+ }
+
+ return retVal;
}
+
+}
+
Modified: clp/trunk/src/omcclpcmdmapping.h
===================================================================
--- clp/trunk/src/omcclpcmdmapping.h 2006-12-08 22:43:44 UTC (rev 417)
+++ clp/trunk/src/omcclpcmdmapping.h 2006-12-08 22:45:14 UTC (rev 418)
@@ -36,6 +36,7 @@
#include <openwbem/OW_CIMValue.hpp>
#include <openwbem/OW_CIMParamValue.hpp>
#include <openwbem/OW_CIMParameter.hpp>
+#include <openwbem/OW_CIMProperty.hpp>
namespace OMCCLP {
@@ -84,6 +85,7 @@
String getReturnValueText();
String getParameterMappedValue(CIMParameter param, String val);
+ String getPropertyMappedValue(CIMProperty prop, String val);
String getErrorMsgText() const {return m_errorMsg;}
CIMValue getReturnValue() const {return m_returnValue;}
CIMParamValueArray getInParamValues () {return m_inParams;}
@@ -101,6 +103,7 @@
bool setMethodToCall(String cmd);
void setProperty (const String name, const CIMValue value);
+ CIMValue resolveMappedValue (const CIMProperty prop, const String val);
protected:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-08 22:43:44
|
Revision: 417
http://svn.sourceforge.net/omc/?rev=417&view=rev
Author: bnicholes
Date: 2006-12-08 14:43:44 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
Make sure that the command terminator is recognized as a LF, CR or CRLF
Modified Paths:
--------------
clp/trunk/src/omcclpdsvrconnection.cpp
clp/trunk/src/omcclpdsvrconnection.h
Modified: clp/trunk/src/omcclpdsvrconnection.cpp
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-08 22:41:31 UTC (rev 416)
+++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-08 22:43:44 UTC (rev 417)
@@ -36,6 +36,7 @@
#include <openwbem/OW_SortedVectorMap.hpp>
#include <openwbem/OW_StringBuffer.hpp>
#include <openwbem/OW_ThreadCancelledException.hpp>
+#include <iostream>
#if defined(BAD)
#undef BAD
@@ -92,7 +93,44 @@
OW_LOG_DEBUG(m_pServer->getEnv()->getLogger(COMPONENT_NAME),
"OMCClpdSvrConnection object destroyed");
}
+
//////////////////////////////////////////////////////////////////////////////
+// Get one line from an input stream. This StringBuffer object will be
+// reset (cleared) before an attempt is made to retrieve the line.
+const String OMCClpdSvrConnection::getLine(std::istream& is)
+{
+ String bfr;
+
+ if (is)
+ {
+ size_t count = 0;
+ std::streambuf *sb = is.rdbuf();
+
+ while (1)
+ {
+ int ch = sb->sbumpc();
+ if (ch == EOF)
+ {
+ is.setstate(count == 0
+ ? (std::ios::failbit | std::ios::eofbit) : std::ios::eofbit);
+ break;
+ }
+
+ ++count;
+
+ if ((ch == '\n') || (ch == '\r'))
+ {
+ break;
+ }
+
+ bfr += String((char)ch);
+ }
+ }
+
+ return bfr;
+}
+
+//////////////////////////////////////////////////////////////////////////////
void
OMCClpdSvrConnection::run()
{
@@ -128,7 +166,7 @@
{
if (!firstLine)
{
- String line = String::getLine(sistr);
+ String line = getLine(sistr);
OW_LOG_DEBUG(logger,
Format("OMCClpdSvrConnection received line: %1", line));
Modified: clp/trunk/src/omcclpdsvrconnection.h
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.h 2006-12-08 22:41:31 UTC (rev 416)
+++ clp/trunk/src/omcclpdsvrconnection.h 2006-12-08 22:43:44 UTC (rev 417)
@@ -76,6 +76,8 @@
protected:
+ const String getLine(std::istream& is);
+
private:
OMCClpdServer* m_pServer;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-08 22:41:32
|
Revision: 416
http://svn.sourceforge.net/omc/?rev=416&view=rev
Author: bnicholes
Date: 2006-12-08 14:41:31 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
The search for the token in the lexer, should be case insensitive
Modified Paths:
--------------
clp/trunk/src/clpcmdgram/clpcmdlexer.ll
Modified: clp/trunk/src/clpcmdgram/clpcmdlexer.ll
===================================================================
--- clp/trunk/src/clpcmdgram/clpcmdlexer.ll 2006-12-06 18:28:33 UTC (rev 415)
+++ clp/trunk/src/clpcmdgram/clpcmdlexer.ll 2006-12-08 22:41:31 UTC (rev 416)
@@ -131,7 +131,7 @@
//printf("\ncheck token %s\n", token);
for (i=0; keywords[i].word; i++) {
- if (strcmp(keywords[i].word, token) == 0) {
+ if (strcasecmp(keywords[i].word, token) == 0) {
return keywords[i].token;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <br...@us...> - 2006-12-06 18:28:52
|
Revision: 415
http://svn.sourceforge.net/omc/?rev=415&view=rev
Author: brieske
Date: 2006-12-06 10:28:33 -0800 (Wed, 06 Dec 2006)
Log Message:
-----------
Handled error condition in IpmiIfcFruInstantiateAll
Modified Paths:
--------------
smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp
Modified: smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp
===================================================================
--- smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp 2006-12-05 00:09:31 UTC (rev 414)
+++ smash/trunk/src/lib/omc-ipmi/IpmiIfcFru.cpp 2006-12-06 18:28:33 UTC (rev 415)
@@ -286,7 +286,8 @@
IpmiIfcFruInstantiateAll(ipmi_drv *drv)
{
ipmiifc_sdr_list *sdr;
-
+ int cc = 0;
+
UInt32 saveAddress = drv->target_addr;
UInt8 saveLun = drv->target_lun;
UInt8 saveChannel = drv->target_channel;
@@ -311,7 +312,6 @@
for (int retries=5;retries;retries-- )
{
- int cc;
cc=IpmiIfcFruGetInv(drv, sdr->record.fruloc->device_id);
if (cc==0xc3) // retry if timeout
{
@@ -320,16 +320,20 @@
}
break;
}
- IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional();
+
+ if(cc == 0)
+ {
+ IpmiFruOptionalRefArray optRefArray = IpmiIfcFruParseOptional();
- IpmiFruRef sref;
- sref = new IpmiFru((int)sdr->length,
- (unsigned char *)sdr->record.full);
- sref->setOptionalRefArray(optRefArray);
- IpmiFruOptionalRefArray tmpRefArray;
- tmpRefArray = sref->getOptionalRefArray();
+ IpmiFruRef sref;
+ sref = new IpmiFru((int)sdr->length,
+ (unsigned char *)sdr->record.full);
+ sref->setOptionalRefArray(optRefArray);
+ IpmiFruOptionalRefArray tmpRefArray;
+ tmpRefArray = sref->getOptionalRefArray();
- g_fruArray.append(sref);
+ g_fruArray.append(sref);
+ }
}
drv->target_addr = saveAddress;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-05 00:09:51
|
Revision: 414
http://svn.sourceforge.net/omc/?rev=414&view=rev
Author: bnicholes
Date: 2006-12-04 16:09:31 -0800 (Mon, 04 Dec 2006)
Log Message:
-----------
replace endl with \r\n to fix the output formatting on a telnet session
Modified Paths:
--------------
clp/trunk/src/omcclp.cpp
clp/trunk/src/omcclpcmdalias.cpp
clp/trunk/src/omcclpcmdcreate.cpp
clp/trunk/src/omcclpcmddelete.cpp
clp/trunk/src/omcclpcmdhelp.cpp
clp/trunk/src/omcclpcmdmapping.cpp
clp/trunk/src/omcclpcmdreset.cpp
clp/trunk/src/omcclpcmdshow.cpp
clp/trunk/src/omcclpcmdstart.cpp
clp/trunk/src/omcclpcmdstop.cpp
clp/trunk/src/omcclpcommand.cpp
clp/trunk/src/omcclpcommandline.cpp
clp/trunk/src/omcclpcommandstatus.cpp
clp/trunk/src/omcclpcommon.cpp
clp/trunk/src/omcclpcommon.h
clp/trunk/src/omcclpconf.cpp
clp/trunk/src/omcclpd.cpp
clp/trunk/src/omcclpprint.cpp
clp/trunk/src/omcclpprint.h
clp/trunk/src/omcclpprogram.cpp
clp/trunk/src/omcclptargetpath.cpp
Modified: clp/trunk/src/omcclp.cpp
===================================================================
--- clp/trunk/src/omcclp.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclp.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -82,11 +82,11 @@
void usage()
{
cerr << PROG_NAME << " " << PROG_VERSION
- << " Server Management Command Line Protocol" << endl;
- cerr << "Copyright (C) 2006 by Novell Inc." << endl;
- cerr << "Usage: " << PROG_NAME << " [OPTIONS]" << endl;
+ << " Server Management Command Line Protocol" << CLPENDL;
+ cerr << "Copyright (C) 2006 by Novell Inc." << CLPENDL;
+ cerr << "Usage: " << PROG_NAME << " [OPTIONS]" << CLPENDL;
- cout << endl << CmdLineParser::getUsage(g_options) << endl;
+ cout << CLPENDL << CmdLineParser::getUsage(g_options) << CLPENDL;
}
void printCmdLineParserExceptionMessage(CmdLineParserException& e)
@@ -94,19 +94,19 @@
switch (e.getErrorCode())
{
case CmdLineParser::E_INVALID_OPTION:
- cerr << "unknown option: " << e.getMessage() << endl;
+ cerr << "unknown option: " << e.getMessage() << CLPENDL;
break;
case CmdLineParser::E_MISSING_ARGUMENT:
- cerr << "missing argument for option: " << e.getMessage() << endl;
+ cerr << "missing argument for option: " << e.getMessage() << CLPENDL;
break;
case CmdLineParser::E_INVALID_NON_OPTION_ARG:
- cerr << "invalid non-option argument: " << e.getMessage() << endl;
+ cerr << "invalid non-option argument: " << e.getMessage() << CLPENDL;
break;
case CmdLineParser::E_MISSING_OPTION:
- cerr << "missing required option: " << e.getMessage() << endl;
+ cerr << "missing required option: " << e.getMessage() << CLPENDL;
break;
default:
- cerr << "failed parsing command line options: " << e << endl;
+ cerr << "failed parsing command line options: " << e << CLPENDL;
break;
}
}
@@ -162,17 +162,17 @@
}
catch (Exception& e)
{
- cerr << "* EXCEPTION CAUGHT IN clp server startup!" << endl;
- cerr << Format("* %1", e) << endl;
+ cerr << "* EXCEPTION CAUGHT IN clp server startup!" << CLPENDL;
+ cerr << Format("* %1", e) << CLPENDL;
}
catch (std::exception& e)
{
- cerr << "* EXCEPTION CAUGHT IN clp server startup!" << endl;
- cerr << Format("* Message: %1", e.what()) << endl;
+ cerr << "* EXCEPTION CAUGHT IN clp server startup!" << CLPENDL;
+ cerr << Format("* Message: %1", e.what()) << CLPENDL;
}
catch (...)
{
- cerr << "* UNKNOWN EXCEPTION CAUGHT IN clpd MAIN!" << endl;
+ cerr << "* UNKNOWN EXCEPTION CAUGHT IN clpd MAIN!" << CLPENDL;
}
if (initialized)
@@ -224,7 +224,7 @@
}
else
{
- cerr << "Exiting CLP server thread" << endl;
+ cerr << "Exiting CLP server thread" << CLPENDL;
m_condition.notifyAll();
return -1;
}
@@ -261,7 +261,7 @@
// it can be referenced by other objects.
gclp = &clp;
- cout << "hello world" << endl;
+ cout << "hello world" << CLPENDL;
/* Initialize the readline library */
init_rl();
@@ -287,16 +287,16 @@
}
catch (AssertionException& a)
{
- cerr << "Caught Assertion: " << a << endl;
+ cerr << "Caught Assertion: " << a << CLPENDL;
ret = 1;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
ret = 1;
}
- //cerr << "Exit recieved. Client returning" << endl;
+ //cerr << "Exit recieved. Client returning" << CLPENDL;
/* Signal a shutdown */
sigPipe->writeInt(0);
return ret;
@@ -360,7 +360,7 @@
OMCCLPServerThread clpsvrt(cond, lock);
int cc, c;
- cout << "hello world" << endl;
+ cout << "hello world" << CLPENDL;
try
{
@@ -454,23 +454,23 @@
}
catch (AssertionException& a)
{
- cerr << "Caught Assertion: " << a << endl;
+ cerr << "Caught Assertion: " << a << CLPENDL;
}
catch (CIMException& e)
{
- cerr << "ERROR: CIMException:" << e.getMessage() << endl;
+ cerr << "ERROR: CIMException:" << e.getMessage() << CLPENDL;
}
catch (Exception& e)
{
- cerr << "ERROR: Exception:" << e.getMessage() << endl;
+ cerr << "ERROR: Exception:" << e.getMessage() << CLPENDL;
}
catch (std::exception& e)
{
- cerr << "ERROR: sdtException:" << e.what() << endl;
+ cerr << "ERROR: sdtException:" << e.what() << CLPENDL;
}
catch (...)
{
- cerr << "ERROR: UnknownException." << endl;
+ cerr << "ERROR: UnknownException." << CLPENDL;
}
return 1;
Modified: clp/trunk/src/omcclpcmdalias.cpp
===================================================================
--- clp/trunk/src/omcclpcmdalias.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdalias.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -157,7 +157,7 @@
for (size_t i = 0; (i < m_aliasDisplayList.size()); ++i)
{
- clpout << m_aliasDisplayList[i] << endl;
+ clpout << m_aliasDisplayList[i] << CLPENDL;
}
}
if (optArg == OUTPUT_DISPLAY_KEYWORD)
Modified: clp/trunk/src/omcclpcmdcreate.cpp
===================================================================
--- clp/trunk/src/omcclpcmdcreate.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdcreate.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -129,7 +129,7 @@
}
catch ( CIMException& ce )
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setProcessingError (INVALID_TARGET);
return false;
@@ -177,7 +177,7 @@
}
catch ( CIMException& ce )
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setProcessingError (INVALID_TARGET);
return false;
Modified: clp/trunk/src/omcclpcmddelete.cpp
===================================================================
--- clp/trunk/src/omcclpcmddelete.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmddelete.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -116,14 +116,14 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setProcessingError (INVALID_TARGET);
getCmdStatusRef()->setCIMStatus(CIM_ERR_METHOD_NOT_FOUND);
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
}
else
@@ -219,7 +219,7 @@
for (int x=0; x < m_deleteInfoArray.size(); x++)
{
clpout << m_deleteInfoArray[x]->getUFiP() << " ";
- clpout << m_deleteInfoArray[x]->getErrorMessage() << endl;
+ clpout << m_deleteInfoArray[x]->getErrorMessage() << CLPENDL;
}
}
}
@@ -230,7 +230,7 @@
for (int x=0; x < m_deleteInfoArray.size(); x++)
{
clpout << m_deleteInfoArray[x]->getUFiP() << " ";
- clpout << m_deleteInfoArray[x]->getErrorMessage() << endl;
+ clpout << m_deleteInfoArray[x]->getErrorMessage() << CLPENDL;
}
clpout << "endoutput\n";
}
@@ -248,10 +248,10 @@
clpout << "<ufit ufct=\"" << UFcT;
clpout << "\" instance=\"" << x << "\"> ";
- clpout << UFcT << ufis << "</ufit>" << endl;
- clpout << "<ufip>" << UFiP << "</ufip>" << endl;
+ clpout << UFcT << ufis << "</ufit>" << CLPENDL;
+ clpout << "<ufip>" << UFiP << "</ufip>" << CLPENDL;
clpout << "<result>" << m_deleteInfoArray[x]->getErrorMessage() << "</result>";
- clpout << endl;
+ clpout << CLPENDL;
}
clpout << "</instance>\n";
clpout << "</target>\n";
Modified: clp/trunk/src/omcclpcmdhelp.cpp
===================================================================
--- clp/trunk/src/omcclpcmdhelp.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdhelp.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -96,29 +96,29 @@
for (size_t i = 0; (i < topics.size()); ++i)
{
String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]);
- clpout << topicHelp << endl;
+ clpout << topicHelp << CLPENDL;
}
}
if (optArg == OUTPUT_DISPLAY_KEYWORD)
{
- clpout << "command=help" << endl;
+ clpout << "command=help" << CLPENDL;
for (size_t i = 0; (i < topics.size()); ++i)
{
String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]);
- clpout << "help=" << topicHelp << endl;
+ clpout << "help=" << topicHelp << CLPENDL;
}
- clpout << "endoutput" << endl;
+ clpout << "endoutput" << CLPENDL;
}
if (optArg == OUTPUT_DISPLAY_CLPXML)
{
- clpout << "<help>" << endl;
+ clpout << "<help>" << CLPENDL;
for (size_t i = 0; (i < topics.size()); ++i)
{
String topicHelp = conf->GetIniSetting(String("help-Commands"), topics[i]);
- clpout << "<text>" << topicHelp << "</text>" << endl;
+ clpout << "<text>" << topicHelp << "</text>" << CLPENDL;
}
- clpout << "</help>" << endl;
- clpout << "</response>" << endl;
+ clpout << "</help>" << CLPENDL;
+ clpout << "</response>" << CLPENDL;
}
}
Modified: clp/trunk/src/omcclpcmdmapping.cpp
===================================================================
--- clp/trunk/src/omcclpcmdmapping.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdmapping.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -65,13 +65,13 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
m_returnValue = CIMValue(2u);
m_errorMsg = String(ce.getDescription());
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
return m_returnValue;
@@ -174,7 +174,7 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
/*XXX Need to specify a real error value here */
m_returnValue = CIMValue(2u);
}
@@ -213,13 +213,13 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
m_returnValue = CIMValue((UInt32)-1);
m_errorMsg = String(ce.getDescription());
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
return m_returnValue;
@@ -368,14 +368,14 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
m_returnValue = CIMValue((UInt32)-1);
m_errorMsg = String("Invalid parameter for method ") + paramName;
ret = false;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
ret = false;
}
return ret;
@@ -410,14 +410,14 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
m_returnValue = CIMValue((UInt32)-1);
m_errorMsg = String("Invalid method invocation string");
ret = false;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
ret = false;
}
Modified: clp/trunk/src/omcclpcmdreset.cpp
===================================================================
--- clp/trunk/src/omcclpcmdreset.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdreset.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -118,14 +118,14 @@
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "reset command general error: " << ce << endl;
+ cerr << "reset command general error: " << ce << CLPENDL;
return false;
}
catch (Exception& e)
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "reset command general error: " << e << endl;
+ cerr << "reset command general error: " << e << CLPENDL;
return false;
}
}
Modified: clp/trunk/src/omcclpcmdshow.cpp
===================================================================
--- clp/trunk/src/omcclpcmdshow.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdshow.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -76,11 +76,11 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
/* If a specific traversal level was specified on the command line
@@ -210,11 +210,11 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
/* If a specific traversal level was specified on the command line
@@ -475,7 +475,7 @@
}
catch (const Exception& e)
{
- clpout << e.getMessage() << endl;
+ clpout << e.getMessage() << CLPENDL;
}
handler->outputTail(clpSession->clpout());
delete handler;
Modified: clp/trunk/src/omcclpcmdstart.cpp
===================================================================
--- clp/trunk/src/omcclpcmdstart.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdstart.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -118,14 +118,14 @@
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "start command general error: " << ce << endl;
+ cerr << "start command general error: " << ce << CLPENDL;
return false;
}
catch (Exception& e)
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "start command general error: " << e << endl;
+ cerr << "start command general error: " << e << CLPENDL;
return false;
}
}
Modified: clp/trunk/src/omcclpcmdstop.cpp
===================================================================
--- clp/trunk/src/omcclpcmdstop.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcmdstop.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -120,14 +120,14 @@
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "stop command general error: " << ce << endl;
+ cerr << "stop command general error: " << ce << CLPENDL;
return false;
}
catch (Exception& e)
{
getCmdStatusRef()->setStatus(COMMAND_EXECUTION_FAILED);
getCmdStatusRef()->setCIMStatus (CIM_ERR_UNEXPECTED_RESPONSE);
- cerr << "stop command general error: " << e << endl;
+ cerr << "stop command general error: " << e << CLPENDL;
return false;
}
}
Modified: clp/trunk/src/omcclpcommand.cpp
===================================================================
--- clp/trunk/src/omcclpcommand.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcommand.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -335,11 +335,11 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
catch (...)
{
@@ -382,11 +382,11 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
catch (...)
{
@@ -550,7 +550,7 @@
/* If there was a general message or message error, then display it */
if (getCmdStatusRef()->getMessageData()->getMessageID() != 0)
{
- clpout << getCmdStatusRef()->getMessageData()->getMessage() << endl;
+ clpout << getCmdStatusRef()->getMessageData()->getMessage() << CLPENDL;
}
break;
case OUTPUT_DISPLAY_KEYWORD:
Modified: clp/trunk/src/omcclpcommandline.cpp
===================================================================
--- clp/trunk/src/omcclpcommandline.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcommandline.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -52,7 +52,7 @@
*/
static void display_message (const char *msg)
{
- cout << endl << msg << endl;
+ cout << CLPENDL << msg << CLPENDL;
rl_on_new_line();
}
Modified: clp/trunk/src/omcclpcommandstatus.cpp
===================================================================
--- clp/trunk/src/omcclpcommandstatus.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcommandstatus.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -299,13 +299,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "status=" + str_msg + "\n";
+ str_msg = "status=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<status>" + str_msg + "</status>" + "\n";
+ str_msg = "<status>" + str_msg + "</status>" + "\r\n";
break;
}
@@ -343,13 +343,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "status_tag=" + str_msg + "\n";
+ str_msg = "status_tag=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<status_tag>" + str_msg + "</status_tag>" + "\n";
+ str_msg = "<status_tag>" + str_msg + "</status_tag>" + "\r\n";
break;
}
@@ -380,13 +380,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "error=" + str_msg + "\n";
+ str_msg = "error=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<error>" + str_msg + "</error>" + "\n";
+ str_msg = "<error>" + str_msg + "</error>" + "\r\n";
break;
}
@@ -419,13 +419,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "error_tag=" + str_msg + "\n";
+ str_msg = "error_tag=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<error_tag>" + str_msg + "</error_tag>" + "\n";
+ str_msg = "<error_tag>" + str_msg + "</error_tag>" + "\r\n";
break;
}
@@ -473,13 +473,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "errtype=" + str_msg + "\n";
+ str_msg = "errtype=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<errtype>" + str_msg + "</errtype>" + "\n";
+ str_msg = "<errtype>" + str_msg + "</errtype>" + "\r\n";
break;
}
@@ -512,13 +512,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "errtype_desc=" + str_msg + "\n";
+ str_msg = "errtype_desc=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<errtype_desc>" + str_msg + "</errtype_desc>" + "\n";
+ str_msg = "<errtype_desc>" + str_msg + "</errtype_desc>" + "\r\n";
break;
}
@@ -552,10 +552,10 @@
str_msg += "\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "cimstat=" + str_msg + "\n";
+ str_msg = "cimstat=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<cimstat>" + str_msg + "</cimstat>" + "\n";
+ str_msg = "<cimstat>" + str_msg + "</cimstat>" + "\r\n";
break;
}
@@ -588,13 +588,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "cimstat_desc=" + str_msg + "\n";
+ str_msg = "cimstat_desc=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<cimstat_desc>" + str_msg + "</cimstat_desc>" + "\n";
+ str_msg = "<cimstat_desc>" + str_msg + "</cimstat_desc>" + "\r\n";
break;
}
@@ -625,13 +625,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "severity=" + str_msg + "\n";
+ str_msg = "severity=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<severity>" + str_msg + "</severity>" + "\n";
+ str_msg = "<severity>" + str_msg + "</severity>" + "\r\n";
break;
}
@@ -664,13 +664,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "severity_desc=" + str_msg + "\n";
+ str_msg = "severity_desc=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<severity_desc>" + str_msg + "</severity_desc>" + "\n";
+ str_msg = "<severity_desc>" + str_msg + "</severity_desc>" + "\r\n";
break;
}
@@ -701,13 +701,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "probcause=" + str_msg + "\n";
+ str_msg = "probcause=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<probcause>" + str_msg + "</probcause>" + "\n";
+ str_msg = "<probcause>" + str_msg + "</probcause>" + "\r\n";
break;
}
@@ -740,13 +740,13 @@
switch (displayArg)
{
case OUTPUT_DISPLAY_TEXT:
- str_msg += "\n";
+ str_msg += "\r\n";
break;
case OUTPUT_DISPLAY_KEYWORD:
- str_msg = "probcause_desc=" + str_msg + "\n";
+ str_msg = "probcause_desc=" + str_msg + "\r\n";
break;
case OUTPUT_DISPLAY_CLPXML:
- str_msg = "<probcause_desc>" + str_msg + "</probcause_desc>" + "\n";
+ str_msg = "<probcause_desc>" + str_msg + "</probcause_desc>" + "\r\n";
break;
}
Modified: clp/trunk/src/omcclpcommon.cpp
===================================================================
--- clp/trunk/src/omcclpcommon.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcommon.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -309,14 +309,14 @@
catch (const CIMException& ce)
{
#ifdef DEBUG1
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
#endif
result = false;
}
catch (Exception& e)
{
#ifdef DEBUG1
- cerr << e << endl;
+ cerr << e << CLPENDL;
#endif
result = false;
}
@@ -474,7 +474,7 @@
CIMObjectPath cop = enu.nextElement();
#ifdef DEBUG1
- cout << ufit << " " << getUFiSFromObjectPath(cop) << endl;
+ cout << ufit << " " << getUFiSFromObjectPath(cop) << CLPENDL;
#endif
/* Match the specifed UFiS with the derived UFiS from the
@@ -717,9 +717,9 @@
try
{
#ifdef DEBUG1
- cout << endl << baseCop.toString();
- cout << endl << assocCT;
- cout << endl << subUFcT;
+ cout << CLPENDL << baseCop.toString();
+ cout << CLPENDL << assocCT;
+ cout << CLPENDL << subUFcT;
#endif
/* Enumerate through all of the selected CIMObjects looking for the one
that matches the specified UFiS */
@@ -765,7 +765,7 @@
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
}
}
@@ -917,9 +917,9 @@
try
{
#ifdef DEBUG1
- cout << endl << baseCop.toString();
- cout << endl << assocCT;
- cout << endl << subUFcT;
+ cout << CLPENDL << baseCop.toString();
+ cout << CLPENDL << assocCT;
+ cout << CLPENDL << subUFcT;
#endif
/* Enumerate through all of the selected CIMObjects looking for the one
that matches the specified UFiS */
@@ -952,11 +952,11 @@
}
catch (const CIMException& ce)
{
- cerr << ce << endl;
+ cerr << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
}
}
Modified: clp/trunk/src/omcclpcommon.h
===================================================================
--- clp/trunk/src/omcclpcommon.h 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpcommon.h 2006-12-05 00:09:31 UTC (rev 414)
@@ -46,20 +46,22 @@
using std::cerr;
using std::cin;
using std::cout;
-using std::endl;
+//using std::endl;
extern void* addrgram__set_scan_string( const char *yy_str );
extern int addrgram_doparse (void *omcclp);
#define DISPLAY_ARRAY1(disparray,meth) \
for (int aaa=0; aaa<disparray.size(); aaa++) { \
- cout << disparray[aaa].meth() << endl; }
+ cout << disparray[aaa].meth() << CLPENDL; }
#define STRIP_QUOTES(s) \
if (s.startsWith('"') && s.endsWith('"')) { \
s = s.substring(1); \
s = s.substring(0,s.length()-1); }
+#define CLPENDL "\r\n"
+
namespace OMCCLP {
class OMCCLPProgram;
Modified: clp/trunk/src/omcclpconf.cpp
===================================================================
--- clp/trunk/src/omcclpconf.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpconf.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -25,6 +25,7 @@
#include "omcclpconf.h"
+#include "omcclpcommon.h"
namespace OMCCLP {
@@ -90,7 +91,7 @@
{
if (m_filename.empty())
{
- cout << "No configuration file specified" << endl;
+ cout << "No configuration file specified" << CLPENDL;
return;
}
Modified: clp/trunk/src/omcclpd.cpp
===================================================================
--- clp/trunk/src/omcclpd.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpd.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -72,8 +72,8 @@
/*XXX will be enabled with job tracking exists
if (!createCLPJobInfo(m_cimClient))
{
- cerr << "Could not create a CLP job instance" << endl;
- cerr << "Running without CLP job data" << endl;
+ cerr << "Could not create a CLP job instance" << CLPENDL;
+ cerr << "Running without CLP job data" << CLPENDL;
}
*/
@@ -95,11 +95,11 @@
}
catch (const CIMException& ce)
{
- cerr << "execute general error: " << ce << endl;
+ cerr << "execute general error: " << ce << CLPENDL;
}
catch (Exception& e)
{
- cerr << "execute general error: " << e << endl;
+ cerr << "execute general error: " << e << CLPENDL;
}
try
@@ -109,12 +109,12 @@
catch (const CIMException& ce)
{
rnclpCommand->display();
- cerr << "display general error: " << ce << endl;
+ cerr << "display general error: " << ce << CLPENDL;
}
catch (Exception& e)
{
rnclpCommand->display();
- cerr << "display general error: " << e << endl;
+ cerr << "display general error: " << e << CLPENDL;
}
}
else
Modified: clp/trunk/src/omcclpprint.cpp
===================================================================
--- clp/trunk/src/omcclpprint.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpprint.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -413,7 +413,7 @@
{
for (size_t i = 0; i < verbs.size(); ++i)
{
- clpout << outputIndent() << verbs[i] << endl;
+ clpout << outputIndent() << verbs[i] << CLPENDL;
}
}
@@ -424,7 +424,7 @@
{
OMCCLPProgram* clpSession = m_showCmd->getCLPSession();
String cpName = cpa.getName();
- clpout << outputIndent() << "Role = " << cpName << endl;
+ clpout << outputIndent() << "Role = " << cpName << CLPENDL;
CIMValue cv = cpa.getValue();;
if (cv && cv.getType() == CIMDataType::REFERENCE)
@@ -438,8 +438,8 @@
String UFcT = getUFcTFromCIMObjectPath (clpSession, ov);
increaseIndent();
- clpout << outputIndent() << "UFiT: " << UFcT << UFiS << endl;
- clpout << outputIndent() << "UFiP: " << UFiP << endl;
+ clpout << outputIndent() << "UFiT: " << UFcT << UFiS << CLPENDL;
+ clpout << outputIndent() << "UFiP: " << UFiP << CLPENDL;
decreaseIndent();
}
}
@@ -452,7 +452,7 @@
{
String UFiP = copi->getTargetPathRef()->getUFiP();
StringArray sa = UFiP.tokenize("/");
- clpout << outputIndent() << safeBack(sa) << endl;
+ clpout << outputIndent() << safeBack(sa) << CLPENDL;
}
/**
@@ -460,11 +460,11 @@
*/
void InstanceKeywordPrinter::outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop)
{
- clpout << "begingroup=property" << endl;
- clpout << "property_name=" << prop.getName()<< endl;
+ clpout << "begingroup=property" << CLPENDL;
+ clpout << "property_name=" << prop.getName()<< CLPENDL;
// TODO this should get the value and type output that data
- clpout << "property_value=" << prop.toString() << endl;
- clpout << "endgroup" << endl;
+ clpout << "property_value=" << prop.toString() << CLPENDL;
+ clpout << "endgroup" << CLPENDL;
}
/**
@@ -475,7 +475,7 @@
{
for (size_t i = 0; i < verbs.size(); ++i)
{
- clpout << "verb=" << verbs[i] << endl;
+ clpout << "verb=" << verbs[i] << CLPENDL;
}
}
@@ -486,8 +486,8 @@
{
OMCCLPProgram* clpSession = m_showCmd->getCLPSession();
String cpName = cpa.getName();
- clpout << "begingroup=reference" << endl;
- clpout << "role=" << cpName << endl;
+ clpout << "begingroup=reference" << CLPENDL;
+ clpout << "role=" << cpName << CLPENDL;
CIMValue cv = cpa.getValue();;
if (cv && cv.getType() == CIMDataType::REFERENCE)
@@ -500,13 +500,13 @@
Int32 UFiS = getUFiSFromObjectPath (ov);
String UFcT = getUFcTFromCIMObjectPath (clpSession, ov);
- clpout << "begingroup=instance" << endl;
- clpout << "ufit=" << UFcT << UFiS << endl;
- clpout << "ufip=" << UFiP << endl;
- clpout << "endgroup" << endl;
+ clpout << "begingroup=instance" << CLPENDL;
+ clpout << "ufit=" << UFcT << UFiS << CLPENDL;
+ clpout << "ufip=" << UFiP << CLPENDL;
+ clpout << "endgroup" << CLPENDL;
}
}
- clpout << "endgroup" << endl;
+ clpout << "endgroup" << CLPENDL;
}
/**
@@ -514,7 +514,7 @@
*/
void InstanceKeywordPrinter::outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& copi)
{
- clpout << "ufip=" << copi->getTargetPathRef()->getUFiP() << endl;
+ clpout << "ufip=" << copi->getTargetPathRef()->getUFiP() << CLPENDL;
}
/**
@@ -537,12 +537,12 @@
*/
void InstanceXMLPrinter::outputStandardVerbs(std::ostream& clpout, StringArray verbs)
{
- clpout << "<standardverbs>" << endl;
+ clpout << "<standardverbs>" << CLPENDL;
for (size_t i = 0; i < verbs.size(); ++i)
{
clpout << verbs[i] << " ";
}
- clpout << endl << "</standardverbs>";
+ clpout << CLPENDL << "</standardverbs>";
}
/**
@@ -552,8 +552,8 @@
{
OMCCLPProgram* clpSession = m_showCmd->getCLPSession();
String cpName = cpa.getName();
- clpout << "<reference>" << endl;
- clpout << "<role>" << cpName << "</role>" << endl;
+ clpout << "<reference>" << CLPENDL;
+ clpout << "<role>" << cpName << "</role>" << CLPENDL;
CIMValue cv = cpa.getValue();;
if (cv && cv.getType() == CIMDataType::REFERENCE)
@@ -566,15 +566,15 @@
Int32 UFiS = getUFiSFromObjectPath (ov);
String UFcT = getUFcTFromCIMObjectPath (clpSession, ov);
- clpout << "<instance>" << endl;
+ clpout << "<instance>" << CLPENDL;
clpout << "<ufit ufct=\"" << UFcT <<
"\" instance=\"" << UFiS << "\">" <<
- UFcT << UFiS << "</ufit>" << endl;
- clpout << "<ufip>" << UFiP << "</ufip>" << endl;
- clpout << "</instance>" << endl;
+ UFcT << UFiS << "</ufit>" << CLPENDL;
+ clpout << "<ufip>" << UFiP << "</ufip>" << CLPENDL;
+ clpout << "</instance>" << CLPENDL;
}
}
- clpout << "</reference>" << endl;
+ clpout << "</reference>" << CLPENDL;
}
/**
@@ -582,7 +582,7 @@
*/
void InstanceXMLPrinter::outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& copi)
{
- clpout << "<ufip>" << copi->getTargetPathRef()->getUFiP() << "</ufip>" << endl;
+ clpout << "<ufip>" << copi->getTargetPathRef()->getUFiP() << "</ufip>" << CLPENDL;
}
Modified: clp/trunk/src/omcclpprint.h
===================================================================
--- clp/trunk/src/omcclpprint.h 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpprint.h 2006-12-05 00:09:31 UTC (rev 414)
@@ -54,38 +54,38 @@
void virtual outputInstanceHead(std::ostream& clpout){}
void virtual outputUFiP(std::ostream& clpout, const String& ufip) {
- clpout << outputIndent() << "UFiP:" << endl;
+ clpout << outputIndent() << "UFiP:" << CLPENDL;
increaseIndent();
- clpout << outputIndent() << ufip << endl;
+ clpout << outputIndent() << ufip << CLPENDL;
decreaseIndent();
}
void virtual outputUFcT(std::ostream& clpout, String ufct){}
void virtual outputTargetHead(std::ostream& clpout){
- clpout << outputIndent() << "Targets:" << endl;
+ clpout << outputIndent() << "Targets:" << CLPENDL;
}
void virtual outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t);
void virtual outputTargetTail(std::ostream& clpout){}
void virtual outputPropertiesHead(std::ostream& clpout) {
- clpout << outputIndent() << "Properties:" << endl;
+ clpout << outputIndent() << "Properties:" << CLPENDL;
}
void virtual outputProperty(std::ostream& clpout, const CIMInstance& ci, CIMProperty& prop) {
String cpName = prop.getName();
- clpout << outputIndent() << cpName << " = " << getPropertyValue(ci, cpName) << endl;
+ clpout << outputIndent() << cpName << " = " << getPropertyValue(ci, cpName) << CLPENDL;
}
void virtual outputPropertiesTail(std::ostream& clpout){}
void virtual outputAssociationsHead(std::ostream& clpout){
- clpout << outputIndent() << "Associations:" << endl;
+ clpout << outputIndent() << "Associations:" << CLPENDL;
}
void virtual outputAssociationHead(std::ostream& clpout, CIMInstance cia){
/*XXX This should print out the user friend name not a CIM class name */
- clpout << outputIndent() << "Association = " << cia.getName() << endl;
+ clpout << outputIndent() << "Association = " << cia.getName() << CLPENDL;
}
void virtual outputAssociation(std::ostream& clpout, CIMProperty cpa);
void virtual outputAssociationTail(std::ostream& clpout){}
void virtual outputAssociationsTail(std::ostream& clpout){}
void virtual outputVerbsHead(std::ostream& clpout) {
- clpout << outputIndent() << "Verbs:" << endl;
+ clpout << outputIndent() << "Verbs:" << CLPENDL;
}
void virtual outputStandardVerbs(std::ostream& clpout, StringArray verbs);
void virtual outputOEMVerbs(std::ostream& clpout, StringArray verbs){}
@@ -134,36 +134,36 @@
virtual ~InstanceKeywordPrinter() {};
void outputHead(std::ostream& clpout) {}
- void outputTail(std::ostream& clpout) {clpout << "endoutput" << endl;}
- void outputInstanceHead(std::ostream& clpout){clpout << "begingroup=instance" << endl;}
+ void outputTail(std::ostream& clpout) {clpout << "endoutput" << CLPENDL;}
+ void outputInstanceHead(std::ostream& clpout){clpout << "begingroup=instance" << CLPENDL;}
void outputUFiP(std::ostream& clpout, const String& ufip) {
- clpout << "ufip=" << ufip << endl;
+ clpout << "ufip=" << ufip << CLPENDL;
}
- void outputUFcT(std::ostream& clpout, String ufct) {clpout << "ufip=" << ufct << endl;}
- void outputTargetHead(std::ostream& clpout){clpout << "begingroup=targets" << endl;}
+ void outputUFcT(std::ostream& clpout, String ufct) {clpout << "ufip=" << ufct << CLPENDL;}
+ void outputTargetHead(std::ostream& clpout){clpout << "begingroup=targets" << CLPENDL;}
void outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t);
- void outputTargetTail(std::ostream& clpout){clpout << "endgroup" << endl;}
+ void outputTargetTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;}
void outputPropertiesHead(std::ostream& clpout) {}
// TODO what should the type be for propValue?
void outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop);
void outputPropertiesTail(std::ostream& clpout){}
- void outputAssociationsHead(std::ostream& clpout) {clpout << "begingroup=associations" << endl;}
+ void outputAssociationsHead(std::ostream& clpout) {clpout << "begingroup=associations" << CLPENDL;}
void outputAssociationHead(std::ostream& clpout, CIMInstance cia){
- clpout << "begingroup=association" << endl;
- clpout << "name=" << cia.getName() << endl;
+ clpout << "begingroup=association" << CLPENDL;
+ clpout << "name=" << cia.getName() << CLPENDL;
}
void outputAssociation(std::ostream& clpout, CIMProperty cpa);
- void outputAssociationTail(std::ostream& clpout){clpout << "endgroup" << endl;}
- void outputAssociationsTail(std::ostream& clpout){clpout << "endgroup" << endl;}
+ void outputAssociationTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;}
+ void outputAssociationsTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;}
void outputVerbsHead(std::ostream& clpout) {
- clpout << "begingroup=verbs" << endl;
+ clpout << "begingroup=verbs" << CLPENDL;
}
void outputStandardVerbs(std::ostream& clpout, StringArray verbs);
void outputOEMVerbs(std::ostream& clpout, StringArray verbs){}
void outputVerbsTail(std::ostream& clpout) {
- clpout << "endgroup" << endl;
+ clpout << "endgroup" << CLPENDL;
}
- void outputInstanceTail(std::ostream& clpout){clpout << "endgroup" << endl;}
+ void outputInstanceTail(std::ostream& clpout){clpout << "endgroup" << CLPENDL;}
};
class InstanceXMLPrinter : public InstancePrinter {
@@ -173,26 +173,26 @@
virtual ~InstanceXMLPrinter() {};
void outputHead(std::ostream& clpout) {}
- void outputTail(std::ostream& clpout) {clpout << "</show></response>" << endl;}
+ void outputTail(std::ostream& clpout) {clpout << "</show></response>" << CLPENDL;}
void outputInstanceHead(std::ostream& clpout){clpout << "<instance>";}
void outputUFiP(std::ostream& clpout, const String& ufip){
- clpout << "<ufip>" << ufip <<"</ufip>" << endl;
+ clpout << "<ufip>" << ufip <<"</ufip>" << CLPENDL;
}
- void outputUFcT(std::ostream& clpout, String ufct) {clpout << "<ufip>" << ufct <<"</ufip>" << endl;}
- void outputTargetHead(std::ostream& clpout){clpout << "<targets>" << endl;}
+ void outputUFcT(std::ostream& clpout, String ufct) {clpout << "<ufip>" << ufct <<"</ufip>" << CLPENDL;}
+ void outputTargetHead(std::ostream& clpout){clpout << "<targets>" << CLPENDL;}
void outputTarget(std::ostream& clpout, const OMCCLPCimObjectPathInfoRef& t);
- void outputTargetTail(std::ostream& clpout){clpout << "</targets>" << endl;}
+ void outputTargetTail(std::ostream& clpout){clpout << "</targets>" << CLPENDL;}
void outputPropertiesHead(std::ostream& clpout) {clpout << "<properties>";}
void outputProperty(std::ostream& clpout, const CIMObjectPath& cop, CIMProperty& prop);
- void outputPropertiesTail(std::ostream& clpout){clpout <<"</properties>" << endl;}
+ void outputPropertiesTail(std::ostream& clpout){clpout <<"</properties>" << CLPENDL;}
void outputAssociationsHead(std::ostream& clpout) {clpout << "<associations>";}
void outputAssociationHead(std::ostream& clpout, CIMInstance cia) {
clpout << "<association>";
- clpout << "<ufct>" << cia.getName() << "</ufct>" << endl;
+ clpout << "<ufct>" << cia.getName() << "</ufct>" << CLPENDL;
}
void outputAssociation(std::ostream& clpout, CIMProperty cpa);
- void outputAssociationTail(std::ostream& clpout) {clpout << "</association>" << endl;}
- void outputAssociationsTail(std::ostream& clpout) {clpout << "</associations>" << endl;}
+ void outputAssociationTail(std::ostream& clpout) {clpout << "</association>" << CLPENDL;}
+ void outputAssociationsTail(std::ostream& clpout) {clpout << "</associations>" << CLPENDL;}
void outputVerbsHead(std::ostream& clpout) {
clpout << "<verbs>";
}
@@ -201,7 +201,7 @@
void outputVerbsTail(std::ostream& clpout) {
clpout << "</verbs>";
}
- void outputInstanceTail(std::ostream& clpout){clpout << "</instance>" << endl;}
+ void outputInstanceTail(std::ostream& clpout){clpout << "</instance>" << CLPENDL;}
};
}
Modified: clp/trunk/src/omcclpprogram.cpp
===================================================================
--- clp/trunk/src/omcclpprogram.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclpprogram.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -47,7 +47,7 @@
bool getCredentials(const String& realm, String& name,
String& passwd, const String& details)
{
- cout << "Authentication required for " << realm << endl;
+ cout << "Authentication required for " << realm << CLPENDL;
cout << "Enter the user name: ";
name = String::getLine(cin);
passwd = GetPass::getPass("Enter the password for " +
@@ -58,7 +58,7 @@
static void display_message (const char *msg)
{
- cout << endl << msg << endl;
+ cout << CLPENDL << msg << CLPENDL;
}
namespace OMCCLP {
@@ -113,7 +113,7 @@
#ifdef OMCCLPDAEMON
OW_LOG_DEBUG(m_logger, msg);
#else
- cout << msg << endl;
+ cout << msg << CLPENDL;
#endif
}
@@ -122,7 +122,7 @@
#ifdef OMCCLPDAEMON
OW_LOG_INFO(m_logger, msg);
#else
- cout << msg << endl;
+ cout << msg << CLPENDL;
#endif
}
@@ -245,7 +245,7 @@
//#else
// display_message (se.c_str());
//#endif
-cout << se << endl;
+cout << se << CLPENDL;
}
catch (Exception& e)
{
@@ -254,7 +254,7 @@
//#else
// display_message (e.getMessage());
//#endif
-cout << e << endl;
+cout << e << CLPENDL;
}
return false;
}
Modified: clp/trunk/src/omcclptargetpath.cpp
===================================================================
--- clp/trunk/src/omcclptargetpath.cpp 2006-12-04 23:15:57 UTC (rev 413)
+++ clp/trunk/src/omcclptargetpath.cpp 2006-12-05 00:09:31 UTC (rev 414)
@@ -421,9 +421,9 @@
try
{
#ifdef DEBUG1
- cout << endl << baseCop.toString();
- cout << endl << assocCT;
- cout << endl << subUFcT;
+ cout << CLPENDL << baseCop.toString();
+ cout << CLPENDL << assocCT;
+ cout << CLPENDL << subUFcT;
#endif
/* Enumerate through all of the selected CIMObjects looking for the one
@@ -477,7 +477,7 @@
}
catch (Exception& e)
{
- cerr << e << endl;
+ cerr << e << CLPENDL;
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bni...@us...> - 2006-12-04 23:15:57
|
Revision: 413
http://svn.sourceforge.net/omc/?rev=413&view=rev
Author: bnicholes
Date: 2006-12-04 15:15:57 -0800 (Mon, 04 Dec 2006)
Log Message:
-----------
On the initial connection, set the clp prompt immediately
Modified Paths:
--------------
clp/trunk/src/omcclpdsvrconnection.cpp
Modified: clp/trunk/src/omcclpdsvrconnection.cpp
===================================================================
--- clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-01 18:16:28 UTC (rev 412)
+++ clp/trunk/src/omcclpdsvrconnection.cpp 2006-12-04 23:15:57 UTC (rev 413)
@@ -122,26 +122,32 @@
try
{
+ bool firstLine = true;
+
while (sistr.good())
{
- String line = String::getLine(sistr);
-
- OW_LOG_DEBUG(logger,
- Format("OMCClpdSvrConnection received line: %1", line));
+ if (!firstLine)
+ {
+ String line = String::getLine(sistr);
+ OW_LOG_DEBUG(logger,
+ Format("OMCClpdSvrConnection received line: %1", line));
- if (!line.empty()) {
- clpref->runCommand(line);
- sostr.flush();
+ if (!line.empty()) {
+ clpref->runCommand(line);
+ sostr.flush();
+ }
+
+ if (clpref->shouldExit())
+ {
+ line = "Good-bye :-)";
+ sostr << line << "\r\n";
+ sostr.flush();
+ break;
+ }
}
-
- if (clpref->shouldExit())
- {
- line = "Good-bye :-)";
- sostr << line << "\r\n";
- sostr.flush();
- break;
- }
-
+ else
+ firstLine = false;
+
/* Send the prompt to the client */
sostr << "\r\nCLP-->";
sostr.flush();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jc...@us...> - 2006-12-01 18:16:32
|
Revision: 412
http://svn.sourceforge.net/omc/?rev=412&view=rev
Author: jcarey
Date: 2006-12-01 10:16:28 -0800 (Fri, 01 Dec 2006)
Log Message:
-----------
Adjustments and additions for autobuild process
Modified Paths:
--------------
contrib/xml-service-provider/trunk/configure.ac
Added Paths:
-----------
contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes
contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec
Removed Paths:
-------------
contrib/xml-service-provider/trunk/xmlservice.spec
Property Changed:
----------------
contrib/xml-service-provider/trunk/
contrib/xml-service-provider/trunk/example-services/
contrib/xml-service-provider/trunk/example-services/apache/
contrib/xml-service-provider/trunk/mof/
contrib/xml-service-provider/trunk/src/
contrib/xml-service-provider/trunk/src/servicexml/
contrib/xml-service-provider/trunk/xmlschema/
Property changes on: contrib/xml-service-provider/trunk
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
configure
aclocal.m4
Makefile
autom4te.cache
config.guess
config.log
config.status
config.sub
config.h.in
libtool
ltmain.sh
mybuild
*.vpj
config
depcomp
missing
*.vpw
*.vpwhistu
*.vtg
*.swp
Modified: contrib/xml-service-provider/trunk/configure.ac
===================================================================
--- contrib/xml-service-provider/trunk/configure.ac 2006-11-30 18:07:12 UTC (rev 411)
+++ contrib/xml-service-provider/trunk/configure.ac 2006-12-01 18:16:28 UTC (rev 412)
@@ -121,7 +121,7 @@
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([openwbem/OW_config.h fcntl.h stdlib.h string.h unistd.h sys/time.h openssl/evp.h sys/param.h sys/vfs.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)])
+AC_CHECK_HEADERS([openwbem/OW_config.h fcntl.h stdlib.h string.h unistd.h sys/time.h ],,[AC_MSG_ERROR(Missing headers: likely won't compile)])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
Property changes on: contrib/xml-service-provider/trunk/example-services
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Property changes on: contrib/xml-service-provider/trunk/example-services/apache
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Property changes on: contrib/xml-service-provider/trunk/mof
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Added: contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes
===================================================================
--- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes (rev 0)
+++ contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.changes 2006-12-01 18:16:28 UTC (rev 412)
@@ -0,0 +1,5 @@
+-------------------------------------------------------------------
+Fri Dec 1 08:48:40 MST 2006 - jc...@no...
+
+- First Release
+
Added: contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec
===================================================================
--- contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec (rev 0)
+++ contrib/xml-service-provider/trunk/openwbem-xmlservice-providers.spec 2006-12-01 18:16:28 UTC (rev 412)
@@ -0,0 +1,109 @@
+#
+# spec file for package openwbem-xmlservice-providers (Version 1.0.0)
+#
+
+# norootforbuild
+
+Name: openwbem-xmlservice-providers
+BuildRequires: gcc-c++ openwbem-devel openwbem-base-providers-devel
+URL: http://sourceforge.net/projects/omc
+%define xmlsvcprefix /usr
+%define xmlsvcsysconfdir /etc
+# Increment the version every time the source code changes.
+Version: 1.0.0
+Release: 1
+Group: System/Management
+Summary: A set of CIM providers that allow system services to be instrumented through a service desciption XML document.
+PreReq: /usr/bin/loadmof.sh
+License: BSD
+# This is necessary to build the RPM as a non-root user.
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+# "yes" is the default, but we put it here explicitly to avoid someone
+# setting it to "no"
+AutoReqProv: yes
+Requires: openwbem openwbem-base-providers
+Requires: cim-schema >= 2.11
+Source0: %{name}-%{version}.tar.gz
+
+%description
+A set of CIM providers that allow system services to be instrumented through a service desciption XML document.
+
+
+Authors:
+--------
+ Jon Carey
+
+
+%prep
+# Untar the sources.
+%setup
+
+%build
+# If the LD_RUN_PATH environment variable is set at link time,
+# it's value is embedded in the resulting binary. At run time,
+# The binary will look here first for shared libraries. This way
+# we link against the libraries we want at run-time even if libs
+# by the same name are in /usr/lib or some other path in /etc/ld.so.conf
+autoreconf --force --install
+CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
+CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" ./configure \
+ --prefix=%{xmlsvcprefix} \
+ --libdir=%_libdir \
+ --sysconfdir=%{xmlsvcsysconfdir}
+make %{?jobs:-j%jobs}
+
+%install
+%{__rm} -rf $RPM_BUILD_ROOT
+%{__mkdir} -p $RPM_BUILD_ROOT
+# Tell 'make install' to install into the BuildRoot
+make DESTDIR=$RPM_BUILD_ROOT install
+mkdir -p $RPM_BUILD_ROOT/%{xmlsvcsysconfdir}/omc/svcinfo.d
+MOFDIR=$RPM_BUILD_ROOT/%{xmlsvcprefix}/share/mof/%{name}
+install -d $MOFDIR
+install mof/*.mof $MOFDIR/
+%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.{a,la}
+%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/*.{a,la}
+%{__rm} -f example-services/Makefile*
+%{__rm} -f example-services/apache/Makefile*
+%{__rm} -f xmlschema/Makefile*
+
+%clean
+%{__rm} -rf $RPM_BUILD_ROOT
+
+%post
+# Any RPM that installs a shared library into any directory
+# listed in /etc/ld.so.conf (or into /usr/lib if it hasn't been
+# fixed yet to install into the correct FHS compliant paths)
+# must run ldconfig in its post install script.
+%run_ldconfig
+# load MOF
+MOFDIR=%{xmlsvcprefix}/share/mof/cim-current/Event
+loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationHandlerCIMXML.mof
+loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationFilter.mof
+loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationSubscription.mof
+MOFDIR=%{xmlsvcprefix}/share/mof/%{name}
+loadmof.sh -n root/cimv2 $MOFDIR/xml-service.mof || /bin/true
+
+%preun
+# if -e operation, not -U
+#if [ "x$1" = "x0" ]
+#then
+#fi
+
+%postun
+%run_ldconfig
+
+%files
+%defattr(-,root,root)
+%doc README
+%doc example-services
+%doc xmlschema
+%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.so*
+%{xmlsvcprefix}/%_lib/lib*.so*
+%dir %{xmlsvcprefix}/share/mof/%{name}
+%{xmlsvcprefix}/share/mof/%{name}/*
+%dir %{xmlsvcsysconfdir}/omc
+%dir %{xmlsvcsysconfdir}/omc/svcinfo.d
+
+%changelog -n openwbem-xmlservice-providers
+
Property changes on: contrib/xml-service-provider/trunk/src
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Property changes on: contrib/xml-service-provider/trunk/src/servicexml
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Property changes on: contrib/xml-service-provider/trunk/xmlschema
___________________________________________________________________
Name: svn:ignore
+ Makefile.in
Deleted: contrib/xml-service-provider/trunk/xmlservice.spec
===================================================================
--- contrib/xml-service-provider/trunk/xmlservice.spec 2006-11-30 18:07:12 UTC (rev 411)
+++ contrib/xml-service-provider/trunk/xmlservice.spec 2006-12-01 18:16:28 UTC (rev 412)
@@ -1,108 +0,0 @@
-#
-# spec file for package openwbem-xmlservice-providers (Version 1.0.0)
-#
-
-# norootforbuild
-
-Name: openwbem-xmlservice-providers
-BuildRequires: gcc-c++
-URL: http://developer.novell.com/wiki/index.php/OMC/
-%define xmlsvcprefix /usr
-%define xmlsvcsysconfdir /etc
-# Increment the version every time the source code changes.
-Version: 1.0.0
-Release: 1
-Group: System/Management
-Summary: A set of CIM providers that allow system services to be instrumented through a service desciption XML document.
-PreReq: /usr/bin/loadmof.sh
-License: BSD
-# This is necessary to build the RPM as a non-root user.
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-# "yes" is the default, but we put it here explicitly to avoid someone
-# setting it to "no"
-AutoReqProv: yes
-Requires: openwbem
-Requires: cim-schema >= 2.11
-Source0: %{name}-%{version}.tar.gz
-
-%description
-A set of CIM providers that allow system services to be instrumented through a service desciption XML document.
-
-
-Authors:
---------
- Jon Carey
-
-
-%prep
-# Untar the sources.
-%setup
-
-%build
-# If the LD_RUN_PATH environment variable is set at link time,
-# it's value is embedded in the resulting binary. At run time,
-# The binary will look here first for shared libraries. This way
-# we link against the libraries we want at run-time even if libs
-# by the same name are in /usr/lib or some other path in /etc/ld.so.conf
-autoreconf --force --install
-CFLAGS="$RPM_OPT_FLAGS -fstack-protector" \
-CXXFLAGS="$RPM_OPT_FLAGS -fstack-protector" ./configure \
- --prefix=%{xmlsvcprefix} \
- --libdir=%_libdir \
- --sysconfdir=%{xmlsvcsysconfdir}
-make %{?jobs:-j%jobs}
-
-%install
-%{__rm} -rf $RPM_BUILD_ROOT
-%{__mkdir} -p $RPM_BUILD_ROOT
-# Tell 'make install' to install into the BuildRoot
-make DESTDIR=$RPM_BUILD_ROOT install
-mkdir -p $RPM_BUILD_ROOT/%{xmlsvcsysconfdir}/omc/svcinfo.d
-MOFDIR=$RPM_BUILD_ROOT/%{xmlsvcprefix}/share/mof/%{name}
-install -d $MOFDIR
-install mof/*.mof $MOFDIR/
-%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.{a,la}
-%{__rm} -f $RPM_BUILD_ROOT%{xmlsvcprefix}/%_lib/*.{a,la}
-%{__rm} -f example-services/Makefile*
-%{__rm} -f example-services/apache/Makefile*
-%{__rm} -f xmlschema/Makefile*
-
-%clean
-%{__rm} -rf $RPM_BUILD_ROOT
-
-%post
-# Any RPM that installs a shared library into any directory
-# listed in /etc/ld.so.conf (or into /usr/lib if it hasn't been
-# fixed yet to install into the correct FHS compliant paths)
-# must run ldconfig in its post install script.
-%run_ldconfig
-# load MOF
-MOFDIR=%{xmlsvcprefix}/share/mof/cim-current/Event
-loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationHandlerCIMXML.mof
-loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationFilter.mof
-loadmof.sh -n root/cimv2 $MOFDIR/CIM_IndicationSubscription.mof
-MOFDIR=%{xmlsvcprefix}/share/mof/%{name}
-loadmof.sh -n root/cimv2 $MOFDIR/xml-service.mof || /bin/true
-
-%preun
-# if -e operation, not -U
-#if [ "x$1" = "x0" ]
-#then
-#fi
-
-%postun
-%run_ldconfig
-
-%files
-%defattr(-,root,root)
-%doc README
-%doc example-services
-%doc xmlschema
-%{xmlsvcprefix}/%_lib/openwbem/c++providers/*.so*
-%{xmlsvcprefix}/%_lib/lib*.so*
-%dir %{xmlsvcprefix}/share/mof/%{name}
-%{xmlsvcprefix}/share/mof/%{name}/*
-%dir %{xmlsvcsysconfdir}/omc/svcinfo.d
-
-%changelog -n openwbem-xmlservice-providers
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|