diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-06-07 17:01:30 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-06-07 17:01:30 +0000 |
commit | a737fcdae3a825d1a3df353a08df3c12285cde43 (patch) | |
tree | ce5c2f7aed6194cb4d94cb07e00b7380bc320e7b /cpp/src/IceSSL/EndpointI.cpp | |
parent | Added missing IComparable (diff) | |
download | ice-a737fcdae3a825d1a3df353a08df3c12285cde43.tar.bz2 ice-a737fcdae3a825d1a3df353a08df3c12285cde43.tar.xz ice-a737fcdae3a825d1a3df353a08df3c12285cde43.zip |
More changes for bug 1996
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r-- | cpp/src/IceSSL/EndpointI.cpp | 78 |
1 files changed, 16 insertions, 62 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp index c057910370c..597f387dc6f 100644 --- a/cpp/src/IceSSL/EndpointI.cpp +++ b/cpp/src/IceSSL/EndpointI.cpp @@ -285,15 +285,8 @@ IceSSL::EndpointI::unknown() const return false; } -vector<IceInternal::TransceiverPtr> -IceSSL::EndpointI::clientTransceivers() const -{ - vector<IceInternal::TransceiverPtr> ret; - return ret; -} - IceInternal::TransceiverPtr -IceSSL::EndpointI::serverTransceiver(IceInternal::EndpointIPtr& endp) const +IceSSL::EndpointI::transceiver(IceInternal::EndpointIPtr& endp) const { endp = const_cast<EndpointI*>(this); return 0; @@ -306,7 +299,7 @@ IceSSL::EndpointI::connectors() const vector<struct sockaddr_in> addresses = IceInternal::getAddresses(_host, _port); for(unsigned int i = 0; i < addresses.size(); ++i) { - connectors.push_back(new ConnectorI(_instance, addresses[i])); + connectors.push_back(new ConnectorI(_instance, addresses[i], _timeout, _connectionId)); } return connectors; } @@ -373,6 +366,11 @@ IceSSL::EndpointI::operator==(const IceInternal::EndpointI& r) const return true; } + if(_host != p->_host) + { + return false; + } + if(_port != p->_port) { return false; @@ -393,26 +391,6 @@ IceSSL::EndpointI::operator==(const IceInternal::EndpointI& r) const return false; } - if(_host != p->_host) - { - // - // We do the most time-consuming part of the comparison last. - // - struct sockaddr_in laddr; - struct sockaddr_in raddr; - try - { - IceInternal::getAddress(_host, _port, laddr); - IceInternal::getAddress(p->_host, p->_port, raddr); - } - catch(const DNSException&) - { - return false; - } - - return IceInternal::compareAddress(laddr, raddr); - } - return true; } @@ -436,6 +414,15 @@ IceSSL::EndpointI::operator<(const IceInternal::EndpointI& r) const return false; } + if(_host < p->_host) + { + return true; + } + else if (p->_host < _host) + { + return false; + } + if(_port < p->_port) { return true; @@ -472,39 +459,6 @@ IceSSL::EndpointI::operator<(const IceInternal::EndpointI& r) const return false; } - if(_host != p->_host) - { - // - // We do the most time-consuming part of the comparison last. - // - struct sockaddr_in laddr; - try - { - IceInternal::getAddress(_host, _port, laddr); - } - catch(const DNSException&) - { - } - - struct sockaddr_in raddr; - try - { - IceInternal::getAddress(p->_host, p->_port, raddr); - } - catch(const DNSException&) - { - } - - if(laddr.sin_addr.s_addr < raddr.sin_addr.s_addr) - { - return true; - } - else if(raddr.sin_addr.s_addr < laddr.sin_addr.s_addr) - { - return false; - } - } - return false; } |