diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-09-10 08:47:19 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-09-10 08:47:19 +0200 |
commit | b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80 (patch) | |
tree | d3e9e9340064538a8dc7a645260d0eb3cdf55d63 /cpp/src/Ice/IPEndpointI.cpp | |
parent | Undo bogus change from an earlier commit. (diff) | |
download | ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.bz2 ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.tar.xz ice-b6c9d9a880f6f1a6908a3c62dfccdce3e68dad80.zip |
ICE-5582 (SOCKs test), ICE-5314 (HTTP proxies), major refactoring of networking code (addition of StreamSocket class abstraction)
Diffstat (limited to 'cpp/src/Ice/IPEndpointI.cpp')
-rw-r--r-- | cpp/src/Ice/IPEndpointI.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp index 68b506fc839..acbfb356715 100644 --- a/cpp/src/Ice/IPEndpointI.cpp +++ b/cpp/src/Ice/IPEndpointI.cpp @@ -14,6 +14,7 @@ #include <Ice/PropertiesI.h> #include <Ice/LoggerUtil.h> #include <Ice/HashUtil.h> +#include <Ice/NetworkProxy.h> #include <IceUtil/MutexPtrLock.h> using namespace std; @@ -558,13 +559,16 @@ IceInternal::EndpointHostResolver::resolve(const string& host, int port, Ice::En vector<ConnectorPtr> connectors; try { + ProtocolSupport protocol = _protocol; if(networkProxy) { - networkProxy = networkProxy->resolveHost(); + networkProxy = networkProxy->resolveHost(_protocol); + if(networkProxy) + { + protocol = networkProxy->getProtocolSupport(); + } } - - connectors = endpoint->connectors(getAddresses(host, port, _protocol, selType, _preferIPv6, true), - networkProxy); + connectors = endpoint->connectors(getAddresses(host, port, protocol, selType, _preferIPv6, true), networkProxy); } catch(const Ice::LocalException& ex) { @@ -666,16 +670,22 @@ IceInternal::EndpointHostResolver::run() } NetworkProxyPtr networkProxy = _instance->networkProxy(); + ProtocolSupport protocol = _protocol; if(networkProxy) { - networkProxy = networkProxy->resolveHost(); + networkProxy = networkProxy->resolveHost(_protocol); + if(networkProxy) + { + protocol = networkProxy->getProtocolSupport(); + } } r.callback->connectors(r.endpoint->connectors(getAddresses(r.host, r.port, - _protocol, + protocol, r.selType, - _preferIPv6, true), + _preferIPv6, + true), networkProxy)); if(threadObserver) @@ -690,6 +700,10 @@ IceInternal::EndpointHostResolver::run() } catch(const Ice::LocalException& ex) { + if(threadObserver) + { + threadObserver->stateChanged(ThreadStateInUseForOther, ThreadStateIdle); + } if(r.observer) { r.observer->failed(ex.ice_name()); |