diff options
Diffstat (limited to 'cpp/test/Ice/servantLocator/Client.cpp')
-rw-r--r-- | cpp/test/Ice/servantLocator/Client.cpp | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/cpp/test/Ice/servantLocator/Client.cpp b/cpp/test/Ice/servantLocator/Client.cpp index 2786ca3248c..2f36a63a9d0 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; } @@ -30,36 +30,24 @@ main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #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); + RemoteConfig rc("Ice/servantLocator", 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; } |