summaryrefslogtreecommitdiffstats
path: root/remote-processor
diff options
context:
space:
mode:
Diffstat (limited to 'remote-processor')
-rw-r--r--remote-processor/ConnectionSocket.cpp5
-rw-r--r--remote-processor/ListeningSocket.cpp9
2 files changed, 11 insertions, 3 deletions
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;
}