summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/TcpTransceiver.cpp11
-rw-r--r--cpp/src/Ice/TcpTransceiver.h2
-rw-r--r--cpp/src/IceSSL/TransceiverI.cpp12
-rw-r--r--cpp/src/IceSSL/TransceiverI.h2
4 files changed, 19 insertions, 8 deletions
diff --git a/cpp/src/Ice/TcpTransceiver.cpp b/cpp/src/Ice/TcpTransceiver.cpp
index cf4055369a5..bbaba2b4df8 100644
--- a/cpp/src/Ice/TcpTransceiver.cpp
+++ b/cpp/src/Ice/TcpTransceiver.cpp
@@ -68,8 +68,14 @@ IceInternal::TcpTransceiver::initialize()
{
if(_traceLevels->network >= 2)
{
+ struct sockaddr_storage localAddr;
+ fdToLocalAddress(_fd, localAddr);
+
Trace out(_logger, _traceLevels->networkCat);
- out << "failed to establish tcp connection\n" << _desc << "\n" << ex;
+ out << "failed to establish tcp connection\n"
+ << "local address: " << addrToString(localAddr) << "\n"
+ << "remote address: " << addrToString(_connectAddr) << "\n"
+ << ex;
}
throw;
}
@@ -539,7 +545,6 @@ IceInternal::TcpTransceiver::connect(const struct sockaddr_storage& addr)
_fd = INVALID_SOCKET;
throw;
}
-#else
- _connectAddr = addr;
#endif
+ _connectAddr = addr;
}
diff --git a/cpp/src/Ice/TcpTransceiver.h b/cpp/src/Ice/TcpTransceiver.h
index fd10dbdb851..0dafdd333ae 100644
--- a/cpp/src/Ice/TcpTransceiver.h
+++ b/cpp/src/Ice/TcpTransceiver.h
@@ -69,8 +69,8 @@ private:
State _state;
std::string _desc;
-#ifdef ICE_USE_IOCP
struct sockaddr_storage _connectAddr;
+#ifdef ICE_USE_IOCP
AsyncInfo _read;
AsyncInfo _write;
int _maxSendPacketSize;
diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp
index 79341d3afdd..7265708a17c 100644
--- a/cpp/src/IceSSL/TransceiverI.cpp
+++ b/cpp/src/IceSSL/TransceiverI.cpp
@@ -242,7 +242,14 @@ IceSSL::TransceiverI::initialize()
if(_instance->networkTraceLevel() >= 2)
{
Trace out(_logger, _instance->networkTraceCategory());
- out << "failed to establish ssl connection\n" << _desc << "\n" << ex;
+
+ struct sockaddr_storage localAddr;
+ IceInternal::fdToLocalAddress(_fd, localAddr);
+
+ out << "failed to establish ssl connection\n"
+ << "local address: " << IceInternal::addrToString(localAddr) << "\n"
+ << "remote address: " << IceInternal::addrToString(_connectAddr) << "\n"
+ << ex;
}
throw;
}
@@ -827,9 +834,8 @@ IceSSL::TransceiverI::TransceiverI(const InstancePtr& instance, SOCKET fd, const
{
_desc = IceInternal::fdToString(_fd);
}
-#else
- _connectAddr = addr;
#endif
+ _connectAddr = addr;
}
IceSSL::TransceiverI::TransceiverI(const InstancePtr& instance, SOCKET fd, const string& adapterName) :
diff --git a/cpp/src/IceSSL/TransceiverI.h b/cpp/src/IceSSL/TransceiverI.h
index d3b96b8062d..f5f30b4a90d 100644
--- a/cpp/src/IceSSL/TransceiverI.h
+++ b/cpp/src/IceSSL/TransceiverI.h
@@ -87,11 +87,11 @@ private:
State _state;
std::string _desc;
+ struct sockaddr_storage _connectAddr;
#ifdef ICE_USE_IOCP
int _maxSendPacketSize;
int _maxReceivePacketSize;
BIO* _iocpBio;
- struct sockaddr_storage _connectAddr;
IceInternal::AsyncInfo _read;
IceInternal::AsyncInfo _write;
std::vector<char> _writeBuffer;