diff options
author | Michi Henning <michi@zeroc.com> | 2009-04-08 16:05:47 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2009-04-08 16:05:47 +1000 |
commit | cd441537b3d6d0be06e0cc4f328684d7548bc728 (patch) | |
tree | a3ccf432900a53e1aee3e83a899d75f5e61b6345 /cpp/demo/Ice/minimal/Client.cpp | |
parent | bug 3739 - generate concrete Python/Ruby class for Slice class that inherits ... (diff) | |
download | ice-cd441537b3d6d0be06e0cc4f328684d7548bc728.tar.bz2 ice-cd441537b3d6d0be06e0cc4f328684d7548bc728.tar.xz ice-cd441537b3d6d0be06e0cc4f328684d7548bc728.zip |
Bug 3940 - C# minimal demo is not minimal
Diffstat (limited to 'cpp/demo/Ice/minimal/Client.cpp')
-rw-r--r-- | cpp/demo/Ice/minimal/Client.cpp | 35 |
1 files changed, 9 insertions, 26 deletions
diff --git a/cpp/demo/Ice/minimal/Client.cpp b/cpp/demo/Ice/minimal/Client.cpp index 0fb434a1ecf..7ccaa6bdbfd 100644 --- a/cpp/demo/Ice/minimal/Client.cpp +++ b/cpp/demo/Ice/minimal/Client.cpp @@ -14,48 +14,31 @@ using namespace std; using namespace Demo; int -main(int argc, char* argv[]) +main() { - int status = EXIT_SUCCESS; Ice::CommunicatorPtr communicator; try { - communicator = Ice::initialize(argc, argv); - if(argc > 1) - { - cerr << argv[0] << ": too many arguments" << endl; - return EXIT_FAILURE; - } + communicator = Ice::initialize(); HelloPrx hello = HelloPrx::checkedCast(communicator->stringToProxy("hello:tcp -p 10000")); - if(!hello) - { - cerr << argv[0] << ": invalid proxy" << endl; - status = EXIT_FAILURE; - } - else - { - hello->sayHello(); - } + hello->sayHello(); + communicator->destroy(); } catch(const Ice::Exception& ex) { cerr << ex << endl; - status = EXIT_FAILURE; - } - - if(communicator) - { try { - communicator->destroy(); + if(communicator) + { + communicator->destroy(); + } } catch(const Ice::Exception& ex) { cerr << ex << endl; - status = EXIT_FAILURE; } + exit(1); } - - return status; } |