diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/EndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/ReferenceFactory.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/TcpEndpointI.cpp | 35 | ||||
-rw-r--r-- | cpp/src/Ice/TcpEndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/UdpEndpointI.cpp | 35 | ||||
-rw-r--r-- | cpp/src/Ice/UdpEndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/UnknownEndpointI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/UnknownEndpointI.h | 2 | ||||
-rw-r--r-- | cpp/src/IceSSL/EndpointI.cpp | 35 | ||||
-rw-r--r-- | cpp/src/IceSSL/EndpointI.h | 2 |
11 files changed, 71 insertions, 50 deletions
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h index 54f99e8606f..245e1964856 100644 --- a/cpp/src/Ice/EndpointI.h +++ b/cpp/src/Ice/EndpointI.h @@ -117,7 +117,7 @@ public: // Expand endpoint out in to separate endpoints for each local // host if endpoint was configured with no host set. // - virtual std::vector<EndpointIPtr> expand() const = 0; + virtual std::vector<EndpointIPtr> expand(bool) const = 0; // // Return whether the endpoint should be published in proxies diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index df8e913f4ea..db34f634e92 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -950,7 +950,7 @@ Ice::ObjectAdapterI::parseEndpoints(const string& str) const ex.str = s; throw ex; } - vector<EndpointIPtr> endps = endp->expand(); + vector<EndpointIPtr> endps = endp->expand(true); endpoints.insert(endpoints.end(), endps.begin(), endps.end()); ++end; diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 83b75d626de..6b720ec6321 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -445,7 +445,7 @@ IceInternal::ReferenceFactory::create(const string& str) EndpointIPtr endp = _instance->endpointFactoryManager()->create(es); if(endp != 0) { - vector<EndpointIPtr> endps = endp->expand(); + vector<EndpointIPtr> endps = endp->expand(false); endpoints.insert(endpoints.end(), endps.begin(), endps.end()); } else diff --git a/cpp/src/Ice/TcpEndpointI.cpp b/cpp/src/Ice/TcpEndpointI.cpp index b21bbd4f21a..def3ad8de97 100644 --- a/cpp/src/Ice/TcpEndpointI.cpp +++ b/cpp/src/Ice/TcpEndpointI.cpp @@ -138,19 +138,6 @@ IceInternal::TcpEndpointI::TcpEndpointI(const InstancePtr& instance, const strin } } } - - if(_host.empty()) - { - const_cast<string&>(_host) = _instance->defaultsAndOverrides()->defaultHost; - if(_host.empty()) - { - const_cast<string&>(_host) = "0.0.0.0"; - } - } - else if(_host == "*") - { - const_cast<string&>(_host) = "0.0.0.0"; - } } IceInternal::TcpEndpointI::TcpEndpointI(BasicStream* s) : @@ -306,8 +293,28 @@ IceInternal::TcpEndpointI::acceptor(EndpointIPtr& endp, const string&) const } vector<EndpointIPtr> -IceInternal::TcpEndpointI::expand() const +IceInternal::TcpEndpointI::expand(bool server) const { + if(_host.empty()) + { + const_cast<string&>(_host) = _instance->defaultsAndOverrides()->defaultHost; + if(_host.empty()) + { + if(server) + { + const_cast<string&>(_host) = "0.0.0.0"; + } + else + { + const_cast<string&>(_host) = "127.0.0.1"; + } + } + } + else if(_host == "*") + { + const_cast<string&>(_host) = "0.0.0.0"; + } + vector<EndpointIPtr> endps; if(_host == "0.0.0.0") { diff --git a/cpp/src/Ice/TcpEndpointI.h b/cpp/src/Ice/TcpEndpointI.h index e36ad037ef6..c04032c1ecd 100644 --- a/cpp/src/Ice/TcpEndpointI.h +++ b/cpp/src/Ice/TcpEndpointI.h @@ -41,7 +41,7 @@ public: virtual TransceiverPtr serverTransceiver(EndpointIPtr&) const; virtual ConnectorPtr connector() const; virtual AcceptorPtr acceptor(EndpointIPtr&, const std::string&) const; - virtual std::vector<EndpointIPtr> expand() const; + virtual std::vector<EndpointIPtr> expand(bool) const; virtual bool publish() const; virtual bool equivalent(const TransceiverPtr&) const; virtual bool equivalent(const AcceptorPtr&) const; diff --git a/cpp/src/Ice/UdpEndpointI.cpp b/cpp/src/Ice/UdpEndpointI.cpp index 686b7e20de6..8cd673bd965 100644 --- a/cpp/src/Ice/UdpEndpointI.cpp +++ b/cpp/src/Ice/UdpEndpointI.cpp @@ -258,19 +258,6 @@ IceInternal::UdpEndpointI::UdpEndpointI(const InstancePtr& instance, const strin } } } - - if(_host.empty()) - { - const_cast<string&>(_host) = _instance->defaultsAndOverrides()->defaultHost; - if(_host.empty()) - { - const_cast<string&>(_host) = "0.0.0.0"; - } - } - else if(_host == "*") - { - const_cast<string&>(_host) = "0.0.0.0"; - } } IceInternal::UdpEndpointI::UdpEndpointI(BasicStream* s) : @@ -471,8 +458,28 @@ IceInternal::UdpEndpointI::acceptor(EndpointIPtr& endp, const string&) const } vector<EndpointIPtr> -IceInternal::UdpEndpointI::expand() const +IceInternal::UdpEndpointI::expand(bool server) const { + if(_host.empty()) + { + const_cast<string&>(_host) = _instance->defaultsAndOverrides()->defaultHost; + if(_host.empty()) + { + if(server) + { + const_cast<string&>(_host) = "0.0.0.0"; + } + else + { + const_cast<string&>(_host) = "127.0.0.1"; + } + } + } + else if(_host == "*") + { + const_cast<string&>(_host) = "0.0.0.0"; + } + vector<EndpointIPtr> endps; if(_host == "0.0.0.0") { diff --git a/cpp/src/Ice/UdpEndpointI.h b/cpp/src/Ice/UdpEndpointI.h index 04fad26e736..942683c4af2 100644 --- a/cpp/src/Ice/UdpEndpointI.h +++ b/cpp/src/Ice/UdpEndpointI.h @@ -41,7 +41,7 @@ public: virtual TransceiverPtr serverTransceiver(EndpointIPtr&) const; virtual ConnectorPtr connector() const; virtual AcceptorPtr acceptor(EndpointIPtr&, const std::string&) const; - virtual std::vector<EndpointIPtr> expand() const; + virtual std::vector<EndpointIPtr> expand(bool) const; virtual bool publish() const; virtual bool equivalent(const TransceiverPtr&) const; virtual bool equivalent(const AcceptorPtr&) const; diff --git a/cpp/src/Ice/UnknownEndpointI.cpp b/cpp/src/Ice/UnknownEndpointI.cpp index a709668fa23..677b2fbc84c 100644 --- a/cpp/src/Ice/UnknownEndpointI.cpp +++ b/cpp/src/Ice/UnknownEndpointI.cpp @@ -122,7 +122,7 @@ IceInternal::UnknownEndpointI::acceptor(EndpointIPtr& endp, const string&) const } vector<EndpointIPtr> -IceInternal::UnknownEndpointI::expand() const +IceInternal::UnknownEndpointI::expand(bool) const { assert(false); vector<EndpointIPtr> ret; diff --git a/cpp/src/Ice/UnknownEndpointI.h b/cpp/src/Ice/UnknownEndpointI.h index b03f64a3b28..72e6a5fd833 100644 --- a/cpp/src/Ice/UnknownEndpointI.h +++ b/cpp/src/Ice/UnknownEndpointI.h @@ -37,7 +37,7 @@ public: virtual TransceiverPtr serverTransceiver(EndpointIPtr&) const; virtual ConnectorPtr connector() const; virtual AcceptorPtr acceptor(EndpointIPtr&, const std::string&) const; - virtual std::vector<EndpointIPtr> expand() const; + virtual std::vector<EndpointIPtr> expand(bool) const; virtual bool publish() const; virtual bool equivalent(const TransceiverPtr&) const; virtual bool equivalent(const AcceptorPtr&) const; diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp index b2db179fa0f..e3e61db7b8b 100644 --- a/cpp/src/IceSSL/EndpointI.cpp +++ b/cpp/src/IceSSL/EndpointI.cpp @@ -138,19 +138,6 @@ IceSSL::EndpointI::EndpointI(const InstancePtr& instance, const string& str) : } } } - - if(_host.empty()) - { - const_cast<string&>(_host) = _instance->defaultHost(); - if(_host.empty()) - { - const_cast<string&>(_host) = "0.0.0.0"; - } - } - else if(_host == "*") - { - const_cast<string&>(_host) = "0.0.0.0"; - } } IceSSL::EndpointI::EndpointI(const InstancePtr& instance, IceInternal::BasicStream* s) : @@ -306,8 +293,28 @@ IceSSL::EndpointI::acceptor(IceInternal::EndpointIPtr& endp, const string& adapt } vector<IceInternal::EndpointIPtr> -IceSSL::EndpointI::expand() const +IceSSL::EndpointI::expand(bool server) const { + if(_host.empty()) + { + const_cast<string&>(_host) = _instance->defaultHost(); + if(_host.empty()) + { + if(server) + { + const_cast<string&>(_host) = "0.0.0.0"; + } + else + { + const_cast<string&>(_host) = "127.0.0.1"; + } + } + } + else if(_host == "*") + { + const_cast<string&>(_host) = "0.0.0.0"; + } + vector<IceInternal::EndpointIPtr> endps; if(_host == "0.0.0.0") { diff --git a/cpp/src/IceSSL/EndpointI.h b/cpp/src/IceSSL/EndpointI.h index 5faef776403..44c9f73e1d2 100644 --- a/cpp/src/IceSSL/EndpointI.h +++ b/cpp/src/IceSSL/EndpointI.h @@ -42,7 +42,7 @@ public: virtual IceInternal::TransceiverPtr serverTransceiver(IceInternal::EndpointIPtr&) const; virtual IceInternal::ConnectorPtr connector() const; virtual IceInternal::AcceptorPtr acceptor(IceInternal::EndpointIPtr&, const std::string&) const; - virtual std::vector<IceInternal::EndpointIPtr> expand() const; + virtual std::vector<IceInternal::EndpointIPtr> expand(bool) const; virtual bool publish() const; virtual bool equivalent(const IceInternal::TransceiverPtr&) const; virtual bool equivalent(const IceInternal::AcceptorPtr&) const; |