summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/udp/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/udp/Server.cpp')
-rw-r--r--cpp/test/Ice/udp/Server.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/cpp/test/Ice/udp/Server.cpp b/cpp/test/Ice/udp/Server.cpp
index 29b108f60c3..6643dc76d95 100644
--- a/cpp/test/Ice/udp/Server.cpp
+++ b/cpp/test/Ice/udp/Server.cpp
@@ -35,20 +35,19 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
adapter2->activate();
}
- string endpoint;
+ ostringstream endpoint;
if(properties->getProperty("Ice.IPv6") == "1")
{
-#ifndef __APPLE__
- endpoint = "udp -h \"ff15::1:1\" -p 12020";
-#else
- endpoint = "udp -h \"ff15::1:1\" -p 12020 --interface \"::1\"";
+ endpoint << "udp -h \"ff15::1:1\" -p " << getTestPort(properties, 10);
+#ifdef __APPLE__
+ endpoint << " --interface \"::1\"";
#endif
}
else
{
- endpoint = "udp -h 239.255.1.1 -p 12020";
+ endpoint << "udp -h 239.255.1.1 -p " << getTestPort(properties, 10);
}
- properties->setProperty("McastTestAdapter.Endpoints", endpoint);
+ properties->setProperty("McastTestAdapter.Endpoints", endpoint.str());
Ice::ObjectAdapterPtr mcastAdapter = communicator->createObjectAdapter("McastTestAdapter");
mcastAdapter->add(ICE_MAKE_SHARED(TestIntfI), Ice::stringToIdentity("test"));
mcastAdapter->activate();