|
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.
|