summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpConnector.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-06-14 10:44:41 -0230
committerDwayne Boone <dwayne@zeroc.com>2007-06-14 10:44:41 -0230
commit9384d90d200a46c26a22135d4f4e39be78d04ab0 (patch)
tree301242e7633043ec9225e2732a81037f438da9c4 /cpp/src/Ice/UdpConnector.cpp
parentFixed bug 2254 (diff)
downloadice-9384d90d200a46c26a22135d4f4e39be78d04ab0.tar.bz2
ice-9384d90d200a46c26a22135d4f4e39be78d04ab0.tar.xz
ice-9384d90d200a46c26a22135d4f4e39be78d04ab0.zip
No longer necessary to expand enpoints in proxies, use same mechanism as for multihomed hosts.
Added some missing .gitignore files.
Diffstat (limited to 'cpp/src/Ice/UdpConnector.cpp')
-rw-r--r--cpp/src/Ice/UdpConnector.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/Ice/UdpConnector.cpp b/cpp/src/Ice/UdpConnector.cpp
index 3aa894b5914..128fca83447 100644
--- a/cpp/src/Ice/UdpConnector.cpp
+++ b/cpp/src/Ice/UdpConnector.cpp
@@ -11,6 +11,7 @@
#include <Ice/UdpTransceiver.h>
#include <Ice/UdpEndpointI.h>
#include <Ice/Network.h>
+#include <Ice/LocalException.h>
using namespace std;
using namespace Ice;
@@ -171,8 +172,15 @@ bool
IceInternal::UdpConnector::equivalent(const string& host, int port) const
{
struct sockaddr_in addr;
- getAddress(host, port, addr);
- return compareAddress(_addr, addr) == 0;
+ try
+ {
+ getAddress(host, port, addr);
+ }
+ catch(const DNSException&)
+ {
+ return false;
+ }
+ return compareAddress(addr, _addr) == 0;
}
IceInternal::UdpConnector::UdpConnector(const InstancePtr& instance, const struct sockaddr_in& addr,