diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-04 02:17:33 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-04 02:17:33 +0000 |
commit | 7290ca9c3ca0511ad7ca3389e916df67edc7f659 (patch) | |
tree | d7277a5851de50b38cd5a3f13fb7f2f68c9d7b23 /TAO/tao/Wait_Strategy.cpp | |
parent | 088908a54b34c0b2107cb8248bf81fef485eabac (diff) | |
download | ATCD-7290ca9c3ca0511ad7ca3389e916df67edc7f659.tar.gz |
ChangeLogTag:Thu Jun 03 21:03:42 1999 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Wait_Strategy.cpp')
-rw-r--r-- | TAO/tao/Wait_Strategy.cpp | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index 0a9ebf0a4d5..27c8d86dcb0 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -88,13 +88,6 @@ TAO_Wait_On_Reactor::handle_input (void) return result; } -int -TAO_Wait_On_Reactor::handle_close (void) -{ - this->reply_received_ = -1; - return 0; -} - // Register the handler with the Reactor. int TAO_Wait_On_Reactor::register_handler (void) @@ -384,42 +377,37 @@ TAO_Wait_On_Leader_Follower::handle_input (void) // Receive any data that is available, without blocking... int result = this->transport_->handle_client_input (0); - if (result == -1 && TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Wait_On_LF::handle_input, " - "handle_client_input == -1\n")); + // Data was read, but there the reply has not been completely // received... if (result == 0) return 0; - // Severe error, abort.... + if (result == -1) + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - Wait_On_LF::handle_input, " + "handle_client_input == -1\n")); + this->reply_received_ = -1; + } + if (result == 1) { - this->reply_received_ = 1; + // Change the result value to something that the Reactor can + // understand result = 0; + this->reply_received_ = 1; } - //ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - waking up <%x>\n", - // this->transport_)); - + // Wake up any threads waiting for this message, either because the + // message failed or because we really received it. this->wake_up (); return result; } -int -TAO_Wait_On_Leader_Follower::handle_close (void) -{ - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, - this->transport_->orb_core ()->leader_follower_lock (), - -1); - this->reply_received_ = -1; - this->wake_up (); - return 0; -} - // Register the handler. int TAO_Wait_On_Leader_Follower::register_handler (void) @@ -504,12 +492,6 @@ TAO_Wait_On_Read::handle_input (void) return this->transport_->handle_client_input (1); } -int -TAO_Wait_On_Read::handle_close (void) -{ - return 0; -} - // No-op. int TAO_Wait_On_Read::register_handler (void) |