diff options
author | Bernard Normier <bernard@zeroc.com> | 2015-12-11 18:00:31 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2015-12-11 18:00:31 -0500 |
commit | a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8 (patch) | |
tree | 979e304b6beb03bdceed36bee74edd5cabfa9add /cpp/test/Ice/info/Client.cpp | |
parent | Fix Windows C++ tests build (diff) | |
download | ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.bz2 ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.tar.xz ice-a2dfe3a7cd457d0d4b38399ab0aca4f0335fb0c8.zip |
Updated Ice::CommunicationHolder and simplified tests
Diffstat (limited to 'cpp/test/Ice/info/Client.cpp')
-rw-r--r-- | cpp/test/Ice/info/Client.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/cpp/test/Ice/info/Client.cpp b/cpp/test/Ice/info/Client.cpp index ba213462775..87a73a10f06 100644 --- a/cpp/test/Ice/info/Client.cpp +++ b/cpp/test/Ice/info/Client.cpp @@ -29,32 +29,15 @@ main(int argc, char* argv[]) #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); #endif - int status; - Ice::CommunicatorPtr communicator; try { - communicator = ICE_COMMUNICATOR_HOLDER_RELEASE(Ice::initialize(argc, argv)); - status = run(argc, argv, communicator); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); + return run(argc, argv, ich.communicator()); } catch(const Ice::Exception& ex) { cerr << ex << endl; - status = EXIT_FAILURE; + return EXIT_FAILURE; } - - if(communicator) - { - try - { - communicator->destroy(); - } - catch(const Ice::Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } - } - - return status; } |