diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Direct.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/Reference.cpp | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/cpp/src/Ice/Direct.cpp b/cpp/src/Ice/Direct.cpp index a1e6958d9a0..eb668c94e7d 100644 --- a/cpp/src/Ice/Direct.cpp +++ b/cpp/src/Ice/Direct.cpp @@ -30,10 +30,18 @@ IceInternal::Direct::Direct(const Current& current) : ObjectAdapterI* adapter = dynamic_cast<ObjectAdapterI*>(_current.adapter.get()); assert(adapter); + // + // Must call incDirectCount() first, because it checks for adapter + // deactivation, and prevents deactivation completion until + // decDirectCount() is called. This is important, because + // getServantManager() may not be called afer deactivation + // completion. + // + adapter->incDirectCount(); + ServantManagerPtr servantManager = adapter->getServantManager(); assert(servantManager); - adapter->incDirectCount(); try { _servant = servantManager->findServant(_current.id); diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 978201db9da..38d9bf3c26a 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -326,10 +326,13 @@ IceInternal::Reference::toString() const assert(adapterId.empty()); vector<EndpointPtr>::const_iterator p; - for(p = endpoints.begin(); p != endpoints.end(); ++p) { - s << ':' << (*p)->toString(); + string endp = (*p)->toString(); + if(!endp.empty()) + { + s << ':' << endp; + } } } else if(!adapterId.empty()) |