summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/InstrumentationI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-06-27 17:54:30 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-06-27 17:54:30 +0200
commitc56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7 (patch)
tree5cb64dfe155e5d2349efb6c7dc4b0f5b5284d44a /cpp/src/Ice/InstrumentationI.cpp
parentFix Windows php build to restore nuget packages (diff)
downloadice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.tar.bz2
ice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.tar.xz
ice-c56f8ab6ca6ca0bdb9536fcce1ef24f1ef40ddc7.zip
Refactored SSL and iAP transports, support for running SSL on top
of TCP/iAP/Bluetooth.
Diffstat (limited to 'cpp/src/Ice/InstrumentationI.cpp')
-rw-r--r--cpp/src/Ice/InstrumentationI.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp
index 6fbedad641f..62f8bda1285 100644
--- a/cpp/src/Ice/InstrumentationI.cpp
+++ b/cpp/src/Ice/InstrumentationI.cpp
@@ -74,6 +74,20 @@ struct ThreadStateChanged
ThreadState newState;
};
+IPConnectionInfo*
+getIPConnectionInfo(const ConnectionInfoPtr& info)
+{
+ for(ConnectionInfoPtr p = info; p; p = p->underlying)
+ {
+ IPConnectionInfo* ipInfo = dynamic_cast<IPConnectionInfo*>(p.get());
+ if(ipInfo)
+ {
+ return ipInfo;
+ }
+ }
+ return ICE_NULLPTR;
+}
+
class ConnectionHelper : public MetricsHelperT<ConnectionMetrics>
{
public:
@@ -108,7 +122,7 @@ public:
if(_id.empty())
{
ostringstream os;
- IPConnectionInfoPtr info = ICE_DYNAMIC_CAST(IPConnectionInfo, _connectionInfo);
+ IPConnectionInfo* info = getIPConnectionInfo(_connectionInfo);
if(info)
{
os << info->localAddress << ':' << info->localPort;