diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /cpp/test/IceStorm/stress/Publisher.cpp | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'cpp/test/IceStorm/stress/Publisher.cpp')
-rw-r--r-- | cpp/test/IceStorm/stress/Publisher.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/cpp/test/IceStorm/stress/Publisher.cpp b/cpp/test/IceStorm/stress/Publisher.cpp index ad0fb64ed85..0be735c52c6 100644 --- a/cpp/test/IceStorm/stress/Publisher.cpp +++ b/cpp/test/IceStorm/stress/Publisher.cpp @@ -30,20 +30,20 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) } catch(const IceUtil::BadOptException& e) { - cerr << argv[0] << ": " << e.reason << endl; - return EXIT_FAILURE; + cerr << argv[0] << ": " << e.reason << endl; + return EXIT_FAILURE; } int events = 1000; string s = opts.optArg("events"); if(!s.empty()) { - events = atoi(s.c_str()); + events = atoi(s.c_str()); } if(events <= 0) { - cerr << argv[0] << ": events must be > 0." << endl; - return EXIT_FAILURE; + cerr << argv[0] << ": events must be > 0." << endl; + return EXIT_FAILURE; } bool oneway = opts.isSet("oneway"); @@ -53,53 +53,53 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) string managerProxy = properties->getProperty(managerProxyProperty); if(managerProxy.empty()) { - cerr << argv[0] << ": property `" << managerProxyProperty << "' is not set" << endl; - return EXIT_FAILURE; + cerr << argv[0] << ": property `" << managerProxyProperty << "' is not set" << endl; + return EXIT_FAILURE; } IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast( - communicator->stringToProxy(managerProxy)); + communicator->stringToProxy(managerProxy)); if(!manager) { - cerr << argv[0] << ": `" << managerProxy << "' is not running" << endl; - return EXIT_FAILURE; + cerr << argv[0] << ": `" << managerProxy << "' is not running" << endl; + return EXIT_FAILURE; } TopicPrx topic; try { - topic = manager->retrieve("fed1"); + topic = manager->retrieve("fed1"); } catch(const NoSuchTopic& e) { - cerr << argv[0] << ": NoSuchTopic: " << e.name << endl; - return EXIT_FAILURE; - + cerr << argv[0] << ": NoSuchTopic: " << e.name << endl; + return EXIT_FAILURE; + } EventPrx twowayProxy = EventPrx::uncheckedCast(topic->getPublisher()->ice_twoway()); EventPrx proxy; if(oneway) { - proxy = EventPrx::uncheckedCast(twowayProxy->ice_oneway()); + proxy = EventPrx::uncheckedCast(twowayProxy->ice_oneway()); } else { - proxy = twowayProxy; + proxy = twowayProxy; } for(int i = 0; i < events; ++i) { - proxy->pub(i); + proxy->pub(i); } if(oneway) { - // - // Before we exit, we ping all proxies as twoway, to make sure - // that all oneways are delivered. - // - twowayProxy->ice_ping(); + // + // Before we exit, we ping all proxies as twoway, to make sure + // that all oneways are delivered. + // + twowayProxy->ice_ping(); } return EXIT_SUCCESS; @@ -113,26 +113,26 @@ main(int argc, char* argv[]) try { - communicator = initialize(argc, argv); - status = run(argc, argv, communicator); + communicator = initialize(argc, argv); + status = run(argc, argv, communicator); } catch(const Exception& ex) { - cerr << ex << endl; - status = EXIT_FAILURE; + cerr << ex << endl; + status = EXIT_FAILURE; } if(communicator) { - try - { - communicator->destroy(); - } - catch(const Exception& ex) - { - cerr << ex << endl; - status = EXIT_FAILURE; - } + try + { + communicator->destroy(); + } + catch(const Exception& ex) + { + cerr << ex << endl; + status = EXIT_FAILURE; + } } return status; |