summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/servantLocator/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-16 23:17:07 +0100
committerJose <jose@zeroc.com>2015-12-16 23:17:07 +0100
commit2a8881e675119046ba95f8bd54c7f4989b2694d7 (patch)
treec86e12d4c6dd724ae311d32897a811daddf8fcec /cpp/test/Ice/servantLocator/Client.cpp
parentFix Objective-C build (diff)
downloadice-2a8881e675119046ba95f8bd54c7f4989b2694d7.tar.bz2
ice-2a8881e675119046ba95f8bd54c7f4989b2694d7.tar.xz
ice-2a8881e675119046ba95f8bd54c7f4989b2694d7.zip
C++11 mapping test updates
Diffstat (limited to 'cpp/test/Ice/servantLocator/Client.cpp')
-rw-r--r--cpp/test/Ice/servantLocator/Client.cpp29
1 files changed, 5 insertions, 24 deletions
diff --git a/cpp/test/Ice/servantLocator/Client.cpp b/cpp/test/Ice/servantLocator/Client.cpp
index e5fba33d612..70ac931e8cb 100644
--- a/cpp/test/Ice/servantLocator/Client.cpp
+++ b/cpp/test/Ice/servantLocator/Client.cpp
@@ -19,8 +19,8 @@ using namespace Test;
int
run(int, char**, const Ice::CommunicatorPtr& communicator)
{
- TestIntfPrx allTests(const Ice::CommunicatorPtr&);
- TestIntfPrx obj = allTests(communicator);
+ TestIntfPrxPtr allTests(const Ice::CommunicatorPtr&);
+ TestIntfPrxPtr obj = allTests(communicator);
obj->shutdown();
return EXIT_SUCCESS;
}
@@ -31,35 +31,16 @@ main(int argc, char* argv[])
#ifdef ICE_STATIC_LIBS
Ice::registerIceSSL();
#endif
-
- int status;
- Ice::CommunicatorPtr communicator;
-
try
{
Ice::InitializationData initData;
initData.properties = Ice::createProperties(argc, argv);
- communicator = Ice::initialize(argc, argv, initData);
- status = run(argc, argv, communicator);
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData);
+ return run(argc, argv, ich.communicator());
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
- status = EXIT_FAILURE;
- }
-
- if(communicator)
- {
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
+ return EXIT_FAILURE;
}
-
- return status;
}