summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/slicing/objects/ServerAMD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/slicing/objects/ServerAMD.cpp')
-rw-r--r--cpp/test/Ice/slicing/objects/ServerAMD.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/cpp/test/Ice/slicing/objects/ServerAMD.cpp b/cpp/test/Ice/slicing/objects/ServerAMD.cpp
index 7f175ad3943..7986c9091b6 100644
--- a/cpp/test/Ice/slicing/objects/ServerAMD.cpp
+++ b/cpp/test/Ice/slicing/objects/ServerAMD.cpp
@@ -37,32 +37,14 @@ main(int argc, char* argv[])
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;
}