diff options
Diffstat (limited to 'cpp/test/Ice/exceptions/Client.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/Client.cpp | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/cpp/test/Ice/exceptions/Client.cpp b/cpp/test/Ice/exceptions/Client.cpp index 67dfd3d0b31..713f463e9c0 100644 --- a/cpp/test/Ice/exceptions/Client.cpp +++ b/cpp/test/Ice/exceptions/Client.cpp @@ -19,20 +19,23 @@ using namespace Test; int run(int, char**, const Ice::CommunicatorPtr& communicator) { - ThrowerPrx allTests(const Ice::CommunicatorPtr&); - ThrowerPrx thrower = allTests(communicator); + ThrowerPrxPtr allTests(const Ice::CommunicatorPtr&); + ThrowerPrxPtr thrower = allTests(communicator); thrower->shutdown(); return EXIT_SUCCESS; } + + int main(int argc, char* argv[]) { #ifdef ICE_STATIC_LIBS Ice::registerIceSSL(); +# if defined(__linux) + Ice::registerIceBT(); +# endif #endif - int status; - Ice::CommunicatorPtr communicator; try { @@ -40,27 +43,16 @@ main(int argc, char* argv[]) initData.properties = Ice::createProperties(argc, argv); initData.properties->setProperty("Ice.Warn.Connections", "0"); initData.properties->setProperty("Ice.MessageSizeMax", "10"); // 10KB max - communicator = Ice::initialize(argc, argv, initData); - status = run(argc, argv, communicator); + + Ice::CommunicatorHolder ich = Ice::initialize(argc, argv, initData); + RemoteConfig rc("Ice/exceptions", 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; } |