diff options
author | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-20 13:13:05 +0000 |
---|---|---|
committer | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-07-20 13:13:05 +0000 |
commit | 0aa49ef5c2d1ccab20888c3257678acb986cbd67 (patch) | |
tree | 8c59ad352e720c1dc7a4aa8b90e60bc037740777 | |
parent | 53c1e7141fad5b9d7f17159ead3d063f22863e9b (diff) | |
download | ATCD-0aa49ef5c2d1ccab20888c3257678acb986cbd67.tar.gz |
ChangeLogTag: Fri Jul 20 08:10:00 2001 Michael Kircher <Michael.Kircher@mchp.siemens.de>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 27 | ||||
-rw-r--r-- | TAO/tao/Asynch_Reply_Dispatcher.cpp | 58 | ||||
-rw-r--r-- | TAO/tao/Leader_Follower.i | 5 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Acceptor.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Connection_Handler.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Connector.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Transport.cpp | 34 | ||||
-rw-r--r-- | TAO/tests/AMI/client.cpp | 2 | ||||
-rw-r--r-- | TAO/tests/AMI/simple_client.cpp | 10 |
10 files changed, 80 insertions, 84 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 5f701bfaa6a..989c5851e49 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,28 @@ +Fri Jul 20 08:10:00 2001 Michael Kircher <Michael.Kircher@mchp.siemens.de> + + * tao/ORB_Core.cpp: + * tao/Leader_Follower.i: + * tao/Strategies/DIOP_Acceptor.cpp: + * tao/Strategies/DIOP_Connection_Handler.cpp: + + Removed old, meanwhile unrelevant comments from me. + +Fri Jul 20 08:10:00 2001 Michael Kircher <Michael.Kircher@mchp.siemens.de> + + * tao/Asynch_Reply_Dispatcher.cpp: + + Added a check for a nil reply handler. In the case of a nil reply + handler no response is dispatched. Thanks to Andreas Geisler + <Andreas.Geisler@erl9.siemens.de> for pointing this out. + + * tests/AMI/simple_client.cpp: + + Added a test case for the above change. + + * tests/AMI/client.cpp: + + Did a cosmetic change. + Thu Jul 19 18:48:09 2001 Irfan Pyarali <irfan@cs.wustl.edu> * tao/ORB.h (run/work_pending/perform_work): Updated documentation @@ -6,7 +31,7 @@ Thu Jul 19 18:48:09 2001 Irfan Pyarali <irfan@cs.wustl.edu> Thu Jul 19 10:37:55 2001 Paul Calabrese <calabrese_p@ociweb.com> - * docs/Options.html: + * docs/Options.html: Document the differences between the default and advanced resource factories. diff --git a/TAO/tao/Asynch_Reply_Dispatcher.cpp b/TAO/tao/Asynch_Reply_Dispatcher.cpp index 1aeb58bccd7..5f4c0b7cb6c 100644 --- a/TAO/tao/Asynch_Reply_Dispatcher.cpp +++ b/TAO/tao/Asynch_Reply_Dispatcher.cpp @@ -155,22 +155,25 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply ( break; } - ACE_TRY_NEW_ENV - { - // Call the Reply Handler's skeleton. - reply_handler_skel_ (this->reply_cdr_, - this->reply_handler_.in (), - reply_error, - ACE_TRY_ENV); - ACE_TRY_CHECK; - } - ACE_CATCHANY + if (!CORBA::is_nil (this->reply_handler_.in ())) { - if (TAO_debug_level >= 4) - ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "Exception during reply handler"); + ACE_TRY_NEW_ENV + { + // Call the Reply Handler's skeleton. + reply_handler_skel_ (this->reply_cdr_, + this->reply_handler_.in (), + reply_error, + ACE_TRY_ENV); + ACE_TRY_CHECK; + } + ACE_CATCHANY + { + if (TAO_debug_level >= 4) + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "Exception during reply handler"); + } + ACE_ENDTRY; } - ACE_ENDTRY; // This was dynamically allocated. Now the job is done. Commit // suicide here. @@ -202,11 +205,14 @@ TAO_Asynch_Reply_Dispatcher::connection_closed (void) // Turn into an output CDR TAO_InputCDR cdr (out_cdr); - this->reply_handler_skel_ (cdr, - this->reply_handler_.in (), - TAO_AMI_REPLY_SYSTEM_EXCEPTION, - ACE_TRY_ENV); - ACE_TRY_CHECK; + if (!CORBA::is_nil (this->reply_handler_.in ())) + { + this->reply_handler_skel_ (cdr, + this->reply_handler_.in (), + TAO_AMI_REPLY_SYSTEM_EXCEPTION, + ACE_TRY_ENV); + ACE_TRY_CHECK; + } } ACE_CATCHANY { @@ -239,17 +245,19 @@ TAO_Asynch_Reply_Dispatcher::reply_timed_out (void) TAO_OutputCDR out_cdr; timeout_failure._tao_encode (out_cdr, ACE_TRY_ENV); - ACE_TRY_CHECK; // Turn into an output CDR TAO_InputCDR cdr (out_cdr); - this->reply_handler_skel_ (cdr, - this->reply_handler_.in (), - TAO_AMI_REPLY_SYSTEM_EXCEPTION, - ACE_TRY_ENV); - ACE_TRY_CHECK; + if (!CORBA::is_nil (this->reply_handler_.in ())) + { + this->reply_handler_skel_ (cdr, + this->reply_handler_.in (), + TAO_AMI_REPLY_SYSTEM_EXCEPTION, + ACE_TRY_ENV); + ACE_TRY_CHECK; + } } ACE_CATCHANY { diff --git a/TAO/tao/Leader_Follower.i b/TAO/tao/Leader_Follower.i index 05615d8396b..9e0f1eeff99 100644 --- a/TAO/tao/Leader_Follower.i +++ b/TAO/tao/Leader_Follower.i @@ -216,11 +216,6 @@ TAO_LF_Client_Leader_Thread_Helper::~TAO_LF_Client_Leader_Thread_Helper (void) ACE_INLINE int TAO_LF_Event_Loop_Thread_Helper::set_event_loop_thread (ACE_Time_Value *max_wait_time) { - // @@ Michael: - // Does this method need to be in that helper? Shouldn't it's contents be invoked - // directly? - // Does call_reset_ need to be proteced by the mutex? - int result = this->lf_strategy_.set_event_loop_thread (max_wait_time, leader_follower_); if (result == 0) diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index de8ebb07536..52a9996365b 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -989,11 +989,6 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV) // being done at this level. this->orb_->_use_omg_ior_format (use_ior); - // @@ Michael: I don't know if this is the best spot, - // we might have to discuss that. - //this->leader_follower_lock_ptr_ = this->client_factory () - // ->create_leader_follower_lock (); - // Set all kinds of orb parameters whose setting needed to be // deferred until after the service config entries had been // determined. diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index 0cb8f29f33d..d0febad299a 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -381,8 +381,7 @@ TAO_DIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, // address. ACE_INET_Addr addr; - // @@ Michael: The following needs to be verified. - if (addr.set (ACE_DEFAULT_SERVER_PORT, // old: ACE_static_cast(u_short, 0), + if (addr.set (ACE_DEFAULT_SERVER_PORT, ACE_static_cast(ACE_UINT32, INADDR_ANY), 1) != 0) return -1; @@ -393,8 +392,6 @@ TAO_DIOP_Acceptor::open_default (TAO_ORB_Core *orb_core, int TAO_DIOP_Acceptor::open_i (const ACE_INET_Addr& addr) { - // @@ Michael: UDP changes --------------- - ACE_NEW_RETURN (this->connection_handler_, TAO_DIOP_Connection_Handler (this->orb_core_, this->lite_flag_, @@ -410,8 +407,6 @@ TAO_DIOP_Acceptor::open_i (const ACE_INET_Addr& addr) this->orb_core_->reactor ()->register_handler (this->connection_handler_, ACE_Event_Handler::READ_MASK); } - // ------------------------------------ - // Set the port for each addr. If there is more than one network // interface then the endpoint created on each interface will be on diff --git a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp index 4b4891c1348..ec2f9243681 100644 --- a/TAO/tao/Strategies/DIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/DIOP_Connection_Handler.cpp @@ -386,8 +386,7 @@ TAO_DIOP_Connection_Handler::handle_input (ACE_HANDLE) resume_handle.set_flag (TAO_Resume_Handle::TAO_HANDLE_LEAVE_SUSPENDED); } // @@ Michael: - // We always return 0, as we do not have any - // send errors. + // We always return 0, as we do not have any send errors. return 0; } diff --git a/TAO/tao/Strategies/DIOP_Connector.cpp b/TAO/tao/Strategies/DIOP_Connector.cpp index 52095095184..71e3774d97d 100644 --- a/TAO/tao/Strategies/DIOP_Connector.cpp +++ b/TAO/tao/Strategies/DIOP_Connector.cpp @@ -70,7 +70,7 @@ TAO_DIOP_Connector::open (TAO_ORB_Core *orb_core) { this->orb_core (orb_core); - // @@ Michael: We do not use traditional connection management. + // @@ Michael: We do not use regular connection management. return 0; } @@ -78,8 +78,6 @@ TAO_DIOP_Connector::open (TAO_ORB_Core *orb_core) int TAO_DIOP_Connector::close (void) { - // @@ Michael: UDP Addition ------------------------------------ - // The list of service handlers cleans itself?? SvcHandlerIterator iter (svc_handler_table_); @@ -89,9 +87,8 @@ TAO_DIOP_Connector::close (void) delete (*iter).int_id_; iter++; } - // ----------------------------------------------------------------- - // @@ Michael: We do not use traditional connection management. + // @@ Michael: We do not use regular connection management. return 0; } @@ -135,8 +132,6 @@ TAO_DIOP_Connector::connect (TAO_GIOP_Invocation *invocation, TAO_DIOP_Connection_Handler *svc_handler = 0; - // @@ Michael -- UDP Additions ---------------------------- - if (svc_handler_table_.find (remote_address, svc_handler) == -1) { TAO_DIOP_Connection_Handler *svc_handler_i = 0; @@ -162,9 +157,7 @@ TAO_DIOP_Connector::connect (TAO_GIOP_Invocation *invocation, svc_handler->get_handle ())); } - // --------------------------------------------------------- - - // @@ Michael: We do not use traditional connection management. + // @@ Michael: We do not use regular connection management. transport = TAO_Transport::_duplicate (svc_handler->transport ()); diff --git a/TAO/tao/Strategies/DIOP_Transport.cpp b/TAO/tao/Strategies/DIOP_Transport.cpp index 1e74bc6f5f1..8ed6aa9b4a6 100644 --- a/TAO/tao/Strategies/DIOP_Transport.cpp +++ b/TAO/tao/Strategies/DIOP_Transport.cpp @@ -38,20 +38,10 @@ TAO_DIOP_Transport::TAO_DIOP_Transport (TAO_DIOP_Connection_Handler *handler, { // @@ Michael: Set the input CDR size to ACE_MAX_DGRAM_SIZE so that // we read the whole UDP packet on a single read. - /* if (flag) - { - // Use the lite version of the protocol - ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Lite (orb_core, - ACE_MAX_DGRAM_SIZE)); - } - else*/ - { - // Use the normal GIOP object - ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Base (orb_core, - ACE_MAX_DGRAM_SIZE)); - } + + ACE_NEW (this->messaging_object_, + TAO_GIOP_Message_Base (orb_core, + ACE_MAX_DGRAM_SIZE)); } TAO_DIOP_Transport::~TAO_DIOP_Transport (void) @@ -233,22 +223,6 @@ TAO_DIOP_Transport::register_handler_i (void) // disturbs the general DIOP assumptions of not being // interested in any network failures, we ignore ICMP messages. return 0; - /* - // @@ It seems like this method should go away, the right reactor is - // picked at object creation time. - ACE_Reactor *r = this->orb_core_->reactor (); - - if (r == this->connection_handler_->reactor ()) - return 0; - - // Set the flag in the Connection Handler - this->connection_handler_->is_registered (1); - - - // Register the handler with the reactor - return r->register_handler (this->connection_handler_, - ACE_Event_Handler::READ_MASK); - */ } diff --git a/TAO/tests/AMI/client.cpp b/TAO/tests/AMI/client.cpp index 43cf26fb87a..08ded59bd64 100644 --- a/TAO/tests/AMI/client.cpp +++ b/TAO/tests/AMI/client.cpp @@ -222,6 +222,8 @@ main (int argc, char *argv[]) poa_manager->activate (ACE_TRY_ENV); ACE_TRY_CHECK; + + // Let the client perform the test in a separate thread Client client (server.in (), niterations); if (client.activate (THR_NEW_LWP | THR_JOINABLE, diff --git a/TAO/tests/AMI/simple_client.cpp b/TAO/tests/AMI/simple_client.cpp index f6e69bd445e..77c14b0e919 100644 --- a/TAO/tests/AMI/simple_client.cpp +++ b/TAO/tests/AMI/simple_client.cpp @@ -209,6 +209,16 @@ main (int argc, char *argv[]) handler._this (ACE_TRY_ENV); ACE_TRY_CHECK; + // Try out sending asynchronous messages without a reply handler + // registered. Things fail if we get an exception. + + ami_test_var->sendc_foo (A::AMI_AMI_TestHandler::_nil (), + 0, + "", + ACE_TRY_ENV); + ACE_TRY_CHECK; + + // Trigger the DidTheRightThing exception on the server side // by sending 0 to it. ACE_DEBUG ((LM_DEBUG, |