summaryrefslogtreecommitdiff
path: root/cpp/demo/IceGrid/allocate/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/IceGrid/allocate/Server.cpp')
-rw-r--r--cpp/demo/IceGrid/allocate/Server.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/demo/IceGrid/allocate/Server.cpp b/cpp/demo/IceGrid/allocate/Server.cpp
index c28d440de70..a2a578e2b5e 100644
--- a/cpp/demo/IceGrid/allocate/Server.cpp
+++ b/cpp/demo/IceGrid/allocate/Server.cpp
@@ -31,6 +31,12 @@ main(int argc, char* argv[])
int
Server::run(int argc, char* argv[])
{
+ if(argc > 1)
+ {
+ cerr << appName() << ": too many arguments" << endl;
+ return EXIT_FAILURE;
+ }
+
Ice::PropertiesPtr properties = communicator()->getProperties();
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello");
Ice::Identity id = communicator()->stringToIdentity(properties->getProperty("Identity"));