diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/IPEndpointI.cpp | 19 | ||||
-rw-r--r-- | cpp/src/Ice/MetricsAdminI.cpp | 22 | ||||
-rw-r--r-- | cpp/src/Ice/ios/StreamTransceiver.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceGrid/SessionServantManager.cpp | 18 | ||||
-rw-r--r-- | cpp/src/IceSSL/OpenSSLEngine.cpp | 6 |
5 files changed, 31 insertions, 35 deletions
diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp index 10983ccc672..a33405d8118 100644 --- a/cpp/src/Ice/IPEndpointI.cpp +++ b/cpp/src/Ice/IPEndpointI.cpp @@ -623,23 +623,20 @@ IceInternal::EndpointHostResolver::run() } } - r.callback->connectors(r.endpoint->connectors(getAddresses(r.host, - r.port, - protocol, - r.selType, - _preferIPv6, - true), - networkProxy)); + vector<Address> addresses = getAddresses(r.host, r.port, protocol, r.selType, _preferIPv6, true); + if(r.observer) + { + r.observer->detach(); + r.observer = 0; + } + + r.callback->connectors(r.endpoint->connectors(addresses, networkProxy)); if(threadObserver) { threadObserver->stateChanged(ThreadStateInUseForOther, ThreadStateIdle); } - if(r.observer) - { - r.observer->detach(); - } } catch(const Ice::LocalException& ex) { diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index d8f03c8b0f6..cf76bac59cb 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -23,7 +23,7 @@ using namespace Ice; using namespace IceInternal; using namespace IceMX; -namespace +namespace { const string suffixes[] = @@ -102,7 +102,7 @@ MetricsMapI::RegExp::RegExp(const string& attribute, const string& regexp) : _at #elif !defined(ICE_CPP11_COMPILER_REGEXP) if(regcomp(&_preg, regexp.c_str(), REG_EXTENDED | REG_NOSUB) != 0) { - throw SyscallException(__FILE__, __LINE__); + throw SyscallException(__FILE__, __LINE__); } #else # if _MSC_VER < 1600 @@ -169,7 +169,7 @@ MetricsMapI::MetricsMapI(const std::string& mapPrefix, const PropertiesPtr& prop { groupByAttributes.push_back(""); } - + for(string::const_iterator p = groupBy.begin(); p != groupBy.end(); ++p) { bool isAlphaNum = IceUtilInternal::isAlpha(*p) || IceUtilInternal::isDigit(*p) || *p == '.'; @@ -233,7 +233,7 @@ MetricsMapFactory::update() assert(_updater); _updater->update(); } - + MetricsViewI::MetricsViewI(const string& name) : _name(name) { } @@ -248,7 +248,7 @@ MetricsViewI::destroy() } bool -MetricsViewI::addOrUpdateMap(const PropertiesPtr& properties, const string& mapName, +MetricsViewI::addOrUpdateMap(const PropertiesPtr& properties, const string& mapName, const MetricsMapFactoryPtr& factory, const ::Ice::LoggerPtr& logger) { const string viewPrefix = "IceMX.Metrics." + _name + "."; @@ -391,7 +391,7 @@ MetricsViewI::getMap(const string& mapName) const return ICE_NULLPTR; } -MetricsAdminI::MetricsAdminI(const PropertiesPtr& properties, const LoggerPtr& logger) : +MetricsAdminI::MetricsAdminI(const PropertiesPtr& properties, const LoggerPtr& logger) : _logger(logger), _properties(properties) { updateViews(); @@ -465,7 +465,7 @@ MetricsAdminI::updateViews() } } _views.swap(views); - + // // Go through removed views to collect maps to update. // @@ -482,7 +482,7 @@ MetricsAdminI::updateViews() } } } - + // // Call the updaters to update the maps. // @@ -533,7 +533,7 @@ MetricsAdminI::getMetricsViewNames(Ice::StringSeq& disabledViews, const Current& #else disabledViews.insert(disabledViews.end(), _disabledViews.begin(), _disabledViews.end()); -#endif +#endif return enabledViews; } @@ -617,7 +617,7 @@ MetricsAdminI::getMetricsFailures(const string& viewName, const string& map, con return MetricsFailures(); } -vector<MetricsMapIPtr> +vector<MetricsMapIPtr> MetricsAdminI::getMaps(const string& mapName) const { Lock sync(*this); @@ -654,7 +654,7 @@ MetricsAdminI::getMetricsView(const std::string& name) return p->second; } -void +void MetricsAdminI::updated(const PropertyDict& props) { for(PropertyDict::const_iterator p = props.begin(); p != props.end(); ++p) diff --git a/cpp/src/Ice/ios/StreamTransceiver.cpp b/cpp/src/Ice/ios/StreamTransceiver.cpp index 8c9305f4031..863428190d1 100644 --- a/cpp/src/Ice/ios/StreamTransceiver.cpp +++ b/cpp/src/Ice/ios/StreamTransceiver.cpp @@ -16,7 +16,6 @@ #include <Ice/LoggerUtil.h> #include <Ice/Buffer.h> #include <Ice/Network.h> -#include <IceSSL/ConnectionInfo.h> #include <CoreFoundation/CoreFoundation.h> diff --git a/cpp/src/IceGrid/SessionServantManager.cpp b/cpp/src/IceGrid/SessionServantManager.cpp index bc22aff6327..70b0d004e98 100644 --- a/cpp/src/IceGrid/SessionServantManager.cpp +++ b/cpp/src/IceGrid/SessionServantManager.cpp @@ -16,7 +16,7 @@ using namespace std; using namespace IceGrid; -SessionServantManager::SessionServantManager(const Ice::ObjectAdapterPtr& adapter, +SessionServantManager::SessionServantManager(const Ice::ObjectAdapterPtr& adapter, const string& instanceName, bool checkConnection, const string& serverAdminCategory, @@ -25,7 +25,7 @@ SessionServantManager::SessionServantManager(const Ice::ObjectAdapterPtr& adapte const Ice::ObjectPtr& nodeAdminRouter, const string& replicaAdminCategory, const Ice::ObjectPtr& replicaAdminRouter, - const AdminCallbackRouterPtr& adminCallbackRouter) : + const AdminCallbackRouterPtr& adminCallbackRouter) : _adapter(adapter), _instanceName(instanceName), _checkConnection(checkConnection), @@ -61,7 +61,7 @@ SessionServantManager::locate(const Ice::Current& current, Ice::LocalObjectPtr&) else { plainServant = true; - + map<Ice::Identity, ServantInfo>::const_iterator p = _servants.find(current.id); if(p == _servants.end() || (_checkConnection && p->second.connection != current.con)) { @@ -72,14 +72,14 @@ SessionServantManager::locate(const Ice::Current& current, Ice::LocalObjectPtr&) servant = p->second.servant; } } - - if(!plainServant && servant && _checkConnection && + + if(!plainServant && servant && _checkConnection && _adminConnections.find(current.con) == _adminConnections.end()) { servant = 0; } - return servant; + return servant; } void @@ -120,7 +120,7 @@ SessionServantManager::addSession(const Ice::ObjectPtr& session, const Ice::Conn void SessionServantManager::setSessionControl(const Ice::ObjectPtr& session, - const Glacier2::SessionControlPrx& ctl, + const Glacier2::SessionControlPrx& ctl, const Ice::IdentitySeq& ids) { Lock sync(*this); @@ -141,7 +141,7 @@ SessionServantManager::setSessionControl(const Ice::ObjectPtr& session, // // Allow invocations on server admin objects. // - if(!p->second.category.empty() && _serverAdminRouter) + if(!p->second.category.empty() && _serverAdminRouter) { Ice::StringSeq seq; seq.push_back(_serverAdminCategory); @@ -236,7 +236,7 @@ SessionServantManager::remove(const Ice::Identity& id) assert(p != _servants.end()); // - // Find the session associated to the servant and remove the servant identity from the + // Find the session associated to the servant and remove the servant identity from the // session identities. // map<Ice::ObjectPtr, SessionInfo>::iterator q = _sessions.find(p->second.session); diff --git a/cpp/src/IceSSL/OpenSSLEngine.cpp b/cpp/src/IceSSL/OpenSSLEngine.cpp index 84238614220..8a6af245907 100644 --- a/cpp/src/IceSSL/OpenSSLEngine.cpp +++ b/cpp/src/IceSSL/OpenSSLEngine.cpp @@ -50,7 +50,7 @@ extern "C" { // -// OpenSSL 1.1.0 introduces a new thread API and removes +// OpenSSL 1.1.0 introduces a new thread API and removes // the need to use a custom thread callback. // #if OPENSSL_VERSION_NUMBER < 0x10100000L @@ -151,7 +151,7 @@ public: ~Init() { // - // OpenSSL 1.1.0 introduces a new thread API and removes + // OpenSSL 1.1.0 introduces a new thread API and removes // the need to use a custom thread callback. // #if OPENSSL_VERSION_NUMBER < 0x10100000L @@ -162,7 +162,7 @@ public: delete[] locks; locks = 0; } - + if(CRYPTO_get_id_callback() == IceSSL_opensslThreadIdCallback) { CRYPTO_set_id_callback(0); |