summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/latency/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/Ice/latency/Server.cpp')
-rw-r--r--cpp/demo/Ice/latency/Server.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/demo/Ice/latency/Server.cpp b/cpp/demo/Ice/latency/Server.cpp
index 661d4546285..42ca2801af0 100644
--- a/cpp/demo/Ice/latency/Server.cpp
+++ b/cpp/demo/Ice/latency/Server.cpp
@@ -30,6 +30,12 @@ main(int argc, char* argv[])
int
LatencyServer::run(int argc, char* argv[])
{
+ if(argc > 1)
+ {
+ cerr << appName() << ": too many arguments" << endl;
+ return EXIT_FAILURE;
+ }
+
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Latency");
Ice::ObjectPtr object = new Ping;
adapter->add(new Ping, communicator()->stringToIdentity("ping"));