diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/test/Glacier2/application/Client.cpp | 22 | ||||
-rw-r--r-- | cpp/test/Glacier2/application/Server.cpp | 4 |
2 files changed, 10 insertions, 16 deletions
diff --git a/cpp/test/Glacier2/application/Client.cpp b/cpp/test/Glacier2/application/Client.cpp index 0bd19f618bb..cc1ebaa0098 100644 --- a/cpp/test/Glacier2/application/Client.cpp +++ b/cpp/test/Glacier2/application/Client.cpp @@ -127,21 +127,15 @@ main(int argc, char* argv[]) initData.properties->setProperty("Ice.Default.Router", ""); Ice::CommunicatorPtr communicator = Ice::initialize(initData); - Ice::ObjectPrx processBase; - { - cout << "testing stringToProxy for process object... " << flush; - processBase = communicator->stringToProxy("Glacier2/admin -f Process:" + - getTestEndpoint(communicator, 11)); - cout << "ok" << endl; - } - Ice::ProcessPrx process; - { - cout << "testing checked cast for admin object... " << flush; - process = Ice::ProcessPrx::checkedCast(processBase); - test(process != 0); - cout << "ok" << endl; - } + cout << "testing stringToProxy for process object... " << flush; + Ice::ObjectPrxPtr processBase = communicator->stringToProxy("Glacier2/admin -f Process:" + getTestEndpoint(communicator, 11)); + cout << "ok" << endl; + + cout << "testing checked cast for admin object... " << flush; + Ice::ProcessPrxPtr process = ICE_CHECKED_CAST(Ice::ProcessPrx, processBase); + test(process != 0); + cout << "ok" << endl; cout << "testing Glacier2 shutdown... " << flush; process->shutdown(); diff --git a/cpp/test/Glacier2/application/Server.cpp b/cpp/test/Glacier2/application/Server.cpp index 6cb3b3aaf06..514a49e7f9e 100644 --- a/cpp/test/Glacier2/application/Server.cpp +++ b/cpp/test/Glacier2/application/Server.cpp @@ -31,7 +31,7 @@ class CallbackI : public Callback public: virtual void - initiateCallback(const CallbackReceiverPrx& proxy, const Ice::Current& current) + initiateCallback(ICE_IN(CallbackReceiverPrxPtr) proxy, const Ice::Current& current) { proxy->callback(current.ctx); } @@ -53,7 +53,7 @@ Server::run(int, char**) communicator()->getProperties()->setProperty("CallbackAdapter.Endpoints", getTestEndpoint(communicator(), 0)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("CallbackAdapter"); - adapter->add(new CallbackI(), Ice::stringToIdentity("callback")); + adapter->add(ICE_MAKE_SHARED(CallbackI), Ice::stringToIdentity("callback")); adapter->activate(); communicator()->waitForShutdown(); |