diff options
-rw-r--r-- | parameter/ParameterMgr.cpp | 6 | ||||
-rw-r--r-- | remote-processor/ConnectionSocket.cpp | 5 | ||||
-rw-r--r-- | remote-processor/ListeningSocket.cpp | 9 |
3 files changed, 16 insertions, 4 deletions
diff --git a/parameter/ParameterMgr.cpp b/parameter/ParameterMgr.cpp index 88270c5..999cb1f 100644 --- a/parameter/ParameterMgr.cpp +++ b/parameter/ParameterMgr.cpp @@ -79,6 +79,7 @@ #include "XmlMemoryDocSink.h" #include "XmlMemoryDocSource.h" #include "Utility.h" +#include <sstream> #define base CElement @@ -2235,7 +2236,10 @@ bool CParameterMgr::handleRemoteProcessingInterface(string& strError) // Start if (!_pRemoteProcessorServer->start()) { - strError = "Unable to start remote processor server"; + ostringstream oss; + oss << "ParameterMgr: Unable to start remote processor server on port " + << getConstFrameworkConfiguration()->getServerPort(); + strError = oss.str(); return false; } diff --git a/remote-processor/ConnectionSocket.cpp b/remote-processor/ConnectionSocket.cpp index 58ca070..3b14798 100644 --- a/remote-processor/ConnectionSocket.cpp +++ b/remote-processor/ConnectionSocket.cpp @@ -28,6 +28,7 @@ #include <netinet/in.h> #include <stdio.h> #include <errno.h> +#include <sstream> #define base CSocket @@ -57,7 +58,9 @@ bool CConnectionSocket::connect(const string& strRemote, uint16_t uiPort, string // Connect if (::connect(getFd(), (struct sockaddr *)&server_addr, sizeof(struct sockaddr))) { - perror("CConnectionSocket::connect::connect"); + ostringstream oss; + oss << "CConnectionSocket::connect::connect on port: " << uiPort; + perror(oss.str().c_str()); strError = "Unable to connnect to target :-("; diff --git a/remote-processor/ListeningSocket.cpp b/remote-processor/ListeningSocket.cpp index 02819e2..620aed1 100644 --- a/remote-processor/ListeningSocket.cpp +++ b/remote-processor/ListeningSocket.cpp @@ -30,6 +30,7 @@ #include <assert.h> #include <netdb.h> #include <strings.h> +#include <sstream> #include <stdio.h> #include <errno.h> @@ -54,14 +55,18 @@ bool CListeningSocket::listen(uint16_t uiPort) // Bind if (bind(getFd(), (struct sockaddr*)&server_addr, sizeof(struct sockaddr)) == -1) { - perror("CListeningSocket::listen::bind"); + ostringstream oss; + oss << "CListeningSocket::listen::bind port " << uiPort; + perror(oss.str().c_str()); return false; } if (::listen(getFd(), 5) == -1) { - perror("CListeningSocket::listen::bind"); + ostringstream oss; + oss << "CListeningSocket::listen::bind port " << uiPort; + perror(oss.str().c_str()); return false; } |