summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/EndpointI.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-08-10 19:05:05 +0200
committerJose <jose@zeroc.com>2012-08-10 19:05:05 +0200
commitdac1de9cee466c49bb66d1fa3ff3e7f8ce74b41d (patch)
treee21599db79868ffc65be32b4dda2056af9e18b0b /cpp/src/IceSSL/EndpointI.cpp
parentRemove some more VC6 compiler fixes (diff)
downloadice-dac1de9cee466c49bb66d1fa3ff3e7f8ce74b41d.tar.bz2
ice-dac1de9cee466c49bb66d1fa3ff3e7f8ce74b41d.tar.xz
ice-dac1de9cee466c49bb66d1fa3ff3e7f8ce74b41d.zip
ICE-4702 - Poor hash algorithm
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index a9eb8e707d8..0b33e896741 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -544,10 +544,15 @@ IceSSL::EndpointI::operator<(const Ice::LocalObject& r) const
Ice::Int
IceSSL::EndpointI::hashInit() const
{
- Int h = 0;
+ Int h = 5381;
+ IceInternal::hashAdd(h, EndpointType);
IceInternal::hashAdd(h, _host);
IceInternal::hashAdd(h, _port);
IceInternal::hashAdd(h, _timeout);
+ IceInternal::hashAdd(h, _protocol.major);
+ IceInternal::hashAdd(h, _protocol.minor);
+ IceInternal::hashAdd(h, _encoding.major);
+ IceInternal::hashAdd(h, _encoding.minor);
IceInternal::hashAdd(h, _connectionId);
IceInternal::hashAdd(h, _compress);
return h;