diff options
Diffstat (limited to 'cpp/test/Ice/optional/Client.cpp')
-rw-r--r-- | cpp/test/Ice/optional/Client.cpp | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/cpp/test/Ice/optional/Client.cpp b/cpp/test/Ice/optional/Client.cpp index 6db3cf0cce2..9f3088c78ad 100644 --- a/cpp/test/Ice/optional/Client.cpp +++ b/cpp/test/Ice/optional/Client.cpp @@ -30,34 +30,22 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif - int status; - Ice::CommunicatorPtr communicator; - try { - communicator = Ice::initialize(argc, argv); - status = run(argc, argv, communicator); + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv); + RemoteConfig rc("Ice/optional", argc, argv, ich.communicator()); + int status = run(argc, argv, ich.communicator()); + rc.finished(status); + return status; } 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; } |