diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-09-14 06:26:31 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-09-14 06:26:31 +0000 |
commit | 502335f0e2d6d407b8c93690bd01d35c33e1f0cf (patch) | |
tree | 38f5b655a2a2411537b9361153d0b81f7f672325 /cpp/demo/Ice/minimal/Client.cpp | |
parent | Bug 454. (diff) | |
download | ice-502335f0e2d6d407b8c93690bd01d35c33e1f0cf.tar.bz2 ice-502335f0e2d6d407b8c93690bd01d35c33e1f0cf.tar.xz ice-502335f0e2d6d407b8c93690bd01d35c33e1f0cf.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=335
Diffstat (limited to 'cpp/demo/Ice/minimal/Client.cpp')
-rw-r--r-- | cpp/demo/Ice/minimal/Client.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/cpp/demo/Ice/minimal/Client.cpp b/cpp/demo/Ice/minimal/Client.cpp index 5f92b93705d..8db552a3dad 100644 --- a/cpp/demo/Ice/minimal/Client.cpp +++ b/cpp/demo/Ice/minimal/Client.cpp @@ -14,30 +14,24 @@ using namespace std; using namespace Demo; int -run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) -{ - HelloPrx hello = HelloPrx::checkedCast(communicator->stringToProxy("hello:tcp -p 10000")); - if(!hello) - { - cerr << argv[0] << ": invalid proxy" << endl; - return EXIT_FAILURE; - } - - hello->sayHello(); - - return EXIT_SUCCESS; -} - -int main(int argc, char* argv[]) { - int status; + int status = EXIT_SUCCESS; Ice::CommunicatorPtr communicator; try { communicator = Ice::initialize(argc, argv); - status = run(argc, argv, communicator); + HelloPrx hello = HelloPrx::checkedCast(communicator->stringToProxy("hello:tcp -p 10000")); + if(!hello) + { + cerr << argv[0] << ": invalid proxy" << endl; + status = EXIT_FAILURE; + } + else + { + hello->sayHello(); + } } catch(const Ice::Exception& ex) { |