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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/demo/IceGrid/allocate/Server.cpp b/cpp/demo/IceGrid/allocate/Server.cpp
index e0f3dce4142..3f50a036bd8 100644
--- a/cpp/demo/IceGrid/allocate/Server.cpp
+++ b/cpp/demo/IceGrid/allocate/Server.cpp
@@ -40,7 +40,8 @@ Server::run(int argc, char* argv[])
Ice::PropertiesPtr properties = communicator()->getProperties();
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello");
Ice::Identity id = communicator()->stringToIdentity(properties->getProperty("Identity"));
- adapter->add(new HelloI(properties->getProperty("Ice.ProgramName")), id);
+ Demo::HelloPtr hello = new HelloI(properties->getProperty("Ice.ProgramName"));
+ adapter->add(hello, id);
adapter->activate();
communicator()->waitForShutdown();
return EXIT_SUCCESS;