summaryrefslogtreecommitdiff
path: root/cpp/demo/IcePack/simple/Server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/demo/IcePack/simple/Server.cpp')
-rw-r--r--cpp/demo/IcePack/simple/Server.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/cpp/demo/IcePack/simple/Server.cpp b/cpp/demo/IcePack/simple/Server.cpp
index c3666ffc5d4..820e88a7051 100644
--- a/cpp/demo/IcePack/simple/Server.cpp
+++ b/cpp/demo/IcePack/simple/Server.cpp
@@ -21,22 +21,21 @@ public:
};
int
+main(int argc, char* argv[])
+{
+ Server app;
+ int status = app.main(argc, argv);
+ return status;
+}
+
+int
Server::run(int argc, char* argv[])
{
Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Hello");
string id = communicator()->getProperties()->getProperty("Identity");
- Ice::ObjectPtr object = new HelloI;
- adapter->add(object, Ice::stringToIdentity(id));
+ adapter->add(new HelloI(), Ice::stringToIdentity(id));
adapter->activate();
communicator()->waitForShutdown();
return EXIT_SUCCESS;
}
-
-int
-main(int argc, char* argv[])
-{
- Server app;
- int status = app.main(argc, argv);
- return status;
-}