summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/udp/Server.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-07-18 23:51:08 +0200
committerJose <jose@zeroc.com>2019-07-18 23:51:08 +0200
commitfc886b010c01cccb8cca3ac4d92f1ebd7fc72295 (patch)
tree51cf00a4a955efecc9c94527aeafcb25ffbe57b9 /cpp/test/Ice/udp/Server.cpp
parentSimplify OutputStream creation (diff)
parentFixed non-thread safe AMD dispatch, fixes #448 (#449) (diff)
downloadice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.tar.bz2
ice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.tar.xz
ice-fc886b010c01cccb8cca3ac4d92f1ebd7fc72295.zip
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/test/Ice/udp/Server.cpp')
-rw-r--r--cpp/test/Ice/udp/Server.cpp22
1 files changed, 19 insertions, 3 deletions
diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp
index 34113776aba..17a8427ef46 100644
--- a/cpp/test/Ice/udp/Server.cpp
+++ b/cpp/test/Ice/udp/Server.cpp
@@ -56,10 +56,26 @@ Server::run(int argc, char** argv)
#endif
}
communicator->getProperties()->setProperty("McastTestAdapter.Endpoints", endpoint.str());
- Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter");
- mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test"));
- mcastAdapter->activate();
+ try
+ {
+ Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter");
+ mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test"));
+ mcastAdapter->activate();
+ }
+ catch(const Ice::SocketException&)
+ {
+ // Multicast IPv6 not supported on the platform. This occurs for example
+ // on AIX PVP clould VMs.
+ if(communicator->getProperties()->getProperty("Ice.IPv6") == "1")
+ {
+ cout << "McastTestAdapter ready" << endl;
+ }
+ else
+ {
+ throw;
+ }
+ }
serverReady();
communicator->waitForShutdown();