summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObjectAdapterI.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-05-01 12:43:38 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-05-01 12:43:38 -0230
commitc80bbef52c82989b48570f4449831b7017917982 (patch)
tree963493c6dafe1ff47310d0f7f58420b2a64ae522 /cpp/src/Ice/ObjectAdapterI.cpp
parentBug 3459 - add rewind/reset to InputStream/OutputStream (diff)
downloadice-c80bbef52c82989b48570f4449831b7017917982.tar.bz2
ice-c80bbef52c82989b48570f4449831b7017917982.tar.xz
ice-c80bbef52c82989b48570f4449831b7017917982.zip
Bug 3972 - improve server network tracing
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterI.cpp')
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp50
1 files changed, 32 insertions, 18 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 4c9c9246c1d..a9704afc3e9 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -1119,29 +1119,43 @@ ObjectAdapterI::parsePublishedEndpoints()
//
string endpts = _communicator->getProperties()->getProperty(_name + ".PublishedEndpoints");
vector<EndpointIPtr> endpoints = parseEndpoints(endpts, false);
- if(!endpoints.empty())
+ if(endpoints.empty())
{
- return endpoints;
+ //
+ // If the PublishedEndpoints property isn't set, we compute the published enpdoints
+ // from the OA endpoints.
+ //
+ transform(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
+ back_inserter(endpoints), Ice::constMemFun(&IncomingConnectionFactory::endpoint));
+
+ //
+ // Expand any endpoints that may be listening on INADDR_ANY to include actual
+ // addresses in the published endpoints.
+ //
+ vector<EndpointIPtr> expandedEndpoints;
+ for(unsigned int i = 0; i < endpoints.size(); ++i)
+ {
+ vector<EndpointIPtr> endps = endpoints[i]->expand();
+ expandedEndpoints.insert(expandedEndpoints.end(), endps.begin(), endps.end());
+ }
+ endpoints = expandedEndpoints;
}
- //
- // If the PublishedEndpoints property isn't set, we compute the published enpdoints
- // from the OA endpoints.
- //
- transform(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- back_inserter(endpoints), Ice::constMemFun(&IncomingConnectionFactory::endpoint));
-
- //
- // Expand any endpoints that may be listening on INADDR_ANY to include actual
- // addresses in the published endpoints.
- //
- vector<EndpointIPtr> expandedEndpoints;
- for(unsigned int i = 0; i < endpoints.size(); ++i)
+ if(_instance->traceLevels()->network >= 3)
{
- vector<EndpointIPtr> endps = endpoints[i]->expand();
- expandedEndpoints.insert(expandedEndpoints.end(), endps.begin(), endps.end());
+ Trace out(_instance->initializationData().logger, _instance->traceLevels()->networkCat);
+ out << "published endpoints for object adapter \`" << getName() << "\':\n";
+ for(unsigned int i = 0; i < endpoints.size(); ++i)
+ {
+ if(i > 0)
+ {
+ out << ":";
+ }
+ out << endpoints[i]->toString();
+ }
}
- return expandedEndpoints;
+
+ return endpoints;
}
void