diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-06-27 17:48:28 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-06-27 17:48:28 +0200 |
commit | a9dd349e2499aa37ad1628eb4f432e87cdabce96 (patch) | |
tree | f51b79a9db52a6153159cb591f29ece1cfb73524 /cpp | |
parent | Fixed ICE-5665: use ff15::1:1 IPv6 multicast address instead of ff01::1:1 (diff) | |
download | ice-a9dd349e2499aa37ad1628eb4f432e87cdabce96.tar.bz2 ice-a9dd349e2499aa37ad1628eb4f432e87cdabce96.tar.xz ice-a9dd349e2499aa37ad1628eb4f432e87cdabce96.zip |
Fixed IceDiscovery test issue on CentOS 6.3
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IceDiscovery/LookupI.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IceDiscovery/PluginI.cpp | 13 | ||||
-rwxr-xr-x | cpp/test/IceDiscovery/simple/run.py | 7 |
3 files changed, 23 insertions, 5 deletions
diff --git a/cpp/src/IceDiscovery/LookupI.cpp b/cpp/src/IceDiscovery/LookupI.cpp index 01e33ca1a2b..9dd9aa4ce2f 100644 --- a/cpp/src/IceDiscovery/LookupI.cpp +++ b/cpp/src/IceDiscovery/LookupI.cpp @@ -166,7 +166,7 @@ LookupI::findObject(const Ice::AMD_Locator_findObjectByIdPtr& cb, const Ice::Ide if(p->second->addCallback(cb)) { - _lookup->findObjectById(_domainId, id, _lookupReply); + _lookup->begin_findObjectById(_domainId, id, _lookupReply); _timer->schedule(p->second, _timeout); } } @@ -183,7 +183,7 @@ LookupI::findAdapter(const Ice::AMD_Locator_findAdapterByIdPtr& cb, const std::s if(p->second->addCallback(cb)) { - _lookup->findAdapterById(_domainId, adapterId, _lookupReply); + _lookup->begin_findAdapterById(_domainId, adapterId, _lookupReply); _timer->schedule(p->second, _timeout); } } @@ -232,7 +232,7 @@ LookupI::objectRequestTimedOut(const ObjectRequestPtr& request) if(request->retry()) { - _lookup->findObjectById(_domainId, request->getId(), _lookupReply); + _lookup->begin_findObjectById(_domainId, request->getId(), _lookupReply); _timer->schedule(p->second, _timeout); } else @@ -255,7 +255,7 @@ LookupI::adapterRequestTimedOut(const AdapterRequestPtr& request) if(request->retry()) { - _lookup->findAdapterById(_domainId, request->getId(), _lookupReply); + _lookup->begin_findAdapterById(_domainId, request->getId(), _lookupReply); _timer->schedule(p->second, _timeout); } else diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp index 643bc894a2d..01846fb7eab 100644 --- a/cpp/src/IceDiscovery/PluginI.cpp +++ b/cpp/src/IceDiscovery/PluginI.cpp @@ -103,6 +103,19 @@ PluginI::initialize() Ice::ObjectPrx lookupPrx = _communicator->stringToProxy("IceDiscovery/Lookup -d:" + lookupEndpoints); lookupPrx = lookupPrx->ice_collocationOptimized(false); // No collocation optimization for the multicast proxy! + try + { + // Ensure we can establish a connection to the multicast proxy + lookupPrx->ice_getConnection(); + } + catch(const Ice::LocalException& ex) + { + ostringstream os; + os << "unable to establish multicast connection, IceDiscovery will be disabled:\n"; + os << "proxy = " << lookupPrx << '\n'; + os << ex; + throw Ice::PluginInitializationException(__FILE__, __LINE__, os.str()); + } // // Add lookup and lookup reply Ice objects diff --git a/cpp/test/IceDiscovery/simple/run.py b/cpp/test/IceDiscovery/simple/run.py index 1039efa930c..064953914b1 100755 --- a/cpp/test/IceDiscovery/simple/run.py +++ b/cpp/test/IceDiscovery/simple/run.py @@ -29,7 +29,12 @@ args = " --Ice.Plugin.IceDiscovery=IceDiscovery:createIceDiscovery" args += " --IceDiscovery.Timeout=30" args += " --IceDiscovery.RetryCount=1" if TestUtil.ipv6: - args += " --IceDiscovery.Interface=\"::1\"" + # + # Don't set the interface for the multicast datagrams, this doesn't + # work with some Linux distributions (CentOS 6.x) + # + #args += " --IceDiscovery.Address=\"ff15::1:1\" --IceDiscovery.Interface=\"::1\"" + args += " --IceDiscovery.Address=\"ff15::1:1\"" else: args += " --IceDiscovery.Interface=127.0.0.1" |