diff options
Diffstat (limited to 'TAO/examples/Logging')
-rw-r--r-- | TAO/examples/Logging/Logger_i.cpp | 3 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Service.cpp | 5 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Service_i.cpp | 16 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Service_i.h | 4 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Test_i.cpp | 27 | ||||
-rw-r--r-- | TAO/examples/Logging/Logging_Test_i.h | 4 |
6 files changed, 17 insertions, 42 deletions
diff --git a/TAO/examples/Logging/Logger_i.cpp b/TAO/examples/Logging/Logger_i.cpp index 1e425fbd119..bf35ba03208 100644 --- a/TAO/examples/Logging/Logger_i.cpp +++ b/TAO/examples/Logging/Logger_i.cpp @@ -38,7 +38,6 @@ Logger_Factory_i::make_logger (const char *name ACE_NEW_THROW_EX (result, Logger_i (name), CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (Logger::_nil ()); } // Enter the new logger into the hash map. Check if the <bind> @@ -63,7 +62,7 @@ Logger_Factory_i::make_logger (const char *name // registration attempt. // @@ Matt, this code doesn't seem right. Can you please check with // Irfan and Carlos about whether this is the right thing to do? - return result->_this (ACE_ENV_SINGLE_ARG_PARAMETER); + return result->_this (); } Logger_i::Logger_i (const char *name) diff --git a/TAO/examples/Logging/Logging_Service.cpp b/TAO/examples/Logging/Logging_Service.cpp index 51f5062e56e..0a17ec0a2b9 100644 --- a/TAO/examples/Logging/Logging_Service.cpp +++ b/TAO/examples/Logging/Logging_Service.cpp @@ -18,13 +18,11 @@ main (int argc, char *argv[]) ACE_TRY { int ret = log_server.init (argc, argv ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (ret == -1) return 1; else { - log_server.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + log_server.run (); } } ACE_CATCH (CORBA::SystemException, sysex) @@ -38,7 +36,6 @@ main (int argc, char *argv[]) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/Logging/Logging_Service_i.cpp b/TAO/examples/Logging/Logging_Service_i.cpp index 3b65ab4da94..0065a520b93 100644 --- a/TAO/examples/Logging/Logging_Service_i.cpp +++ b/TAO/examples/Logging/Logging_Service_i.cpp @@ -60,10 +60,8 @@ Logger_Server::init (int argc, "init_child_poa"), -1); - ACE_CHECK_RETURN (-1); - this->orb_manager_.activate_poa_manager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + this->orb_manager_.activate_poa_manager (); // Parse the command line arguments. if (this->parse_args () != 0) @@ -83,8 +81,7 @@ Logger_Server::init (int argc, str.in ())); // Initialize the naming service - int ret = this->init_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + int ret = this->init_naming_service (); if (ret != 0) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", @@ -109,8 +106,7 @@ Logger_Server::init_naming_service (ACE_ENV_SINGLE_ARG_DECL_NOT_USED ACE_ENV_SIN return -1; // Create an instance of the Logger_Factory - Logger_Factory_var factory = this->factory_impl_._this (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + Logger_Factory_var factory = this->factory_impl_._this (); //Register the logger_factory CosNaming::Name factory_name (1); @@ -119,16 +115,14 @@ Logger_Server::init_naming_service (ACE_ENV_SINGLE_ARG_DECL_NOT_USED ACE_ENV_SIN this->my_name_server_->bind (factory_name, factory.in () ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); return 0; } int -Logger_Server::run (ACE_ENV_SINGLE_ARG_DECL) +Logger_Server::run (void) { - int ret = this->orb_manager_.run (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (-1); + int ret = this->orb_manager_.run (); if (ret == -1) ACE_ERROR_RETURN ((LM_ERROR, "Logger_Server::run"), diff --git a/TAO/examples/Logging/Logging_Service_i.h b/TAO/examples/Logging/Logging_Service_i.h index 6cf6f8546ac..a9b5dac5bc7 100644 --- a/TAO/examples/Logging/Logging_Service_i.h +++ b/TAO/examples/Logging/Logging_Service_i.h @@ -61,7 +61,7 @@ public: ACE_ENV_ARG_DECL); // Initialize the Logger_Server state - parsing arguments and ... - int run (ACE_ENV_SINGLE_ARG_DECL); + int run (void); // Run the ORB. Logger_ptr make_logger (const char *name @@ -73,7 +73,7 @@ private: int parse_args (void); // Parses the commandline arguments. - int init_naming_service (ACE_ENV_SINGLE_ARG_DECL); + int init_naming_service (void); // Initialises the name server and registers logger_factory with the // name server. diff --git a/TAO/examples/Logging/Logging_Test_i.cpp b/TAO/examples/Logging/Logging_Test_i.cpp index f82bba200c4..e980a0cfa80 100644 --- a/TAO/examples/Logging/Logging_Test_i.cpp +++ b/TAO/examples/Logging/Logging_Test_i.cpp @@ -11,8 +11,8 @@ #include "ace/OS_NS_arpa_inet.h" #include "ace/OS_NS_sys_time.h" -ACE_RCSID (Logger, - Logging_Test_i, +ACE_RCSID (Logger, + Logging_Test_i, "$Id$") // Constructor @@ -45,7 +45,6 @@ Logger_Client::init (int argc, char *argv[]) "internet" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "\nOrb initialized successfully\n")); @@ -55,16 +54,14 @@ Logger_Client::init (int argc, char *argv[]) return -1; // Initialize the naming service - int ret = this->init_naming_service (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + int ret = this->init_naming_service (); if (ret != 0) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize naming" "services.\n"), -1); // Create the logger instances - ret = this->init_loggers (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ret = this->init_loggers (); if (ret != 0) ACE_ERROR_RETURN ((LM_ERROR, " (%P|%t) Unable to initialize logger" @@ -77,14 +74,13 @@ Logger_Client::init (int argc, char *argv[]) return -1; } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } int -Logger_Client::init_naming_service (ACE_ENV_SINGLE_ARG_DECL) +Logger_Client::init_naming_service (void) { // Initialize the naming services if (my_name_client_.init (orb_.in ()) != 0) @@ -141,7 +137,7 @@ Logger_Client::init_naming_service (ACE_ENV_SINGLE_ARG_DECL) } int -Logger_Client::init_loggers (ACE_ENV_SINGLE_ARG_DECL) +Logger_Client::init_loggers (void) { // Retrieve the Logger obj ref corresponding to key1 and // key2. @@ -149,11 +145,9 @@ Logger_Client::init_loggers (ACE_ENV_SINGLE_ARG_DECL) { this->logger_1_ = factory_->make_logger ("key1" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; this->logger_2_ = factory_->make_logger ("key2" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (this->logger_1_.in ())) ACE_ERROR_RETURN ((LM_ERROR, @@ -175,7 +169,6 @@ Logger_Client::init_loggers (ACE_ENV_SINGLE_ARG_DECL) "\nTrying to resolve already created logger...")); Logger_var logger_3 = factory_->make_logger ("key1" ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; if (CORBA::is_nil (logger_3.in ())) ACE_DEBUG ((LM_DEBUG, @@ -251,23 +244,18 @@ Logger_Client::run (void) // Change the verbosity. this->logger_1_->verbosity (Logger::VERBOSE_LITE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Log the first Log_Record (VERBOSE_LITE) this->logger_1_->log (rec1 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Change the verbosity again. this->logger_2_->verbosity (Logger::VERBOSE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Log the second Log_Record (VERBOSE) this->logger_2_->log (rec2 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Change the verbosity again this->logger_2_->verbosity (Logger::SILENT ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Log the third log record using logv() (this shows if the // verbosity level overrides the logger's verbosity level) @@ -276,11 +264,9 @@ Logger_Client::run (void) // Change the verbosity again (so that regular log msgs can be // seen again) this->logger_2_->verbosity (Logger::VERBOSE ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; // Log the fourth record using log_twoway() this->logger_2_->log_twoway (rec4 ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; } ACE_CATCHANY @@ -288,7 +274,6 @@ Logger_Client::run (void) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "run"); } ACE_ENDTRY; - ACE_CHECK_RETURN (-1); return 0; } diff --git a/TAO/examples/Logging/Logging_Test_i.h b/TAO/examples/Logging/Logging_Test_i.h index 781c55a7b4f..326b1a6cabf 100644 --- a/TAO/examples/Logging/Logging_Test_i.h +++ b/TAO/examples/Logging/Logging_Test_i.h @@ -68,10 +68,10 @@ private: const char *msg); // Prepares the <Log_Record> for logging. - int init_naming_service (ACE_ENV_SINGLE_ARG_DECL); + int init_naming_service (void); // Initialises the name server and resolves the logger_factory - int init_loggers (ACE_ENV_SINGLE_ARG_DECL); + int init_loggers (void); // Instantiates the 2 logger member variables void show_record (Logger::Log_Record &newrec); |