diff options
author | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-14 22:32:59 +0000 |
---|---|---|
committer | mk1 <mk1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-14 22:32:59 +0000 |
commit | 396714e5cc8b267dd50eb08e6880a36e28e58b20 (patch) | |
tree | 4a4ac93df385a9822211ae00c8901b50616acdd4 | |
parent | c80452713bea73a098ede0f8ac31d3a264743cf7 (diff) | |
download | ATCD-396714e5cc8b267dd50eb08e6880a36e28e58b20.tar.gz |
ChangeLogTag: Wed Feb 14 16:30:23 2001 Michael Kircher <Michael.Kircher@mchp.siemens.de>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 28 | ||||
-rw-r--r-- | TAO/tao/Exclusive_TMS.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 16 | ||||
-rw-r--r-- | TAO/tao/Muxed_TMS.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Transport.cpp | 11 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Transport.cpp | 11 | ||||
-rw-r--r-- | TAO/tao/Wait_On_Leader_Follower.cpp | 8 |
7 files changed, 84 insertions, 8 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index ba5768dddc1..062fd2d583a 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,31 @@ +Wed Feb 14 16:30:23 2001 Michael Kircher <Michael.Kircher@mchp.siemens.de> + + * tao/Muxed_TMS.cpp: Changed the return value in the case of a + not found reply dispatcher from -1 to 0. The semantics of the + return values is 1, for success, 0, for a not found reply dispatcher + (which is not critical, as this can easily happen with timeouts), and + -1 on a critical error. + Added in-source documentation for this. + + * tao/Exclusive_TMS.cpp: Documented the return value, see description + for Muxed_TMS.cpp. + + * tao/IIOP_Transport.cpp: + * tao/Strategies/SHMIOP_Transport.cpp: + * tao/Strategies/UIOP_Transport.cpp: + Changed return path of the method <process_message>. + In the case that we could not find the right reply dispatcher because + of a (meanwhile) invalid reply ID, we continue processing messages + instead of giving up processing. + This should fix the problem with the tao/tests/Timeout test. + + * tao/Wait_On_Leader_Follower.cpp: + Added code to remove the leader follower condition variable in the + case of a timeout. This should fix a bug, where the condition + variable of the follower thread kept being registered + with the leader follower model while it went already away. + + Wed Feb 14 15:36:23 2001 Pradeep Gore <pradeep@cs.wustl.edu> * docs/orbsvcs.html: Added the Notification Service and it's tests diff --git a/TAO/tao/Exclusive_TMS.cpp b/TAO/tao/Exclusive_TMS.cpp index 63f9dbdb434..adfb720853f 100644 --- a/TAO/tao/Exclusive_TMS.cpp +++ b/TAO/tao/Exclusive_TMS.cpp @@ -71,6 +71,9 @@ TAO_Exclusive_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) TAO_Exclusive_TMS::dispatch_reply - <%d != %d>\n"), this->request_id_, params.request_id_)); + + // The return value 0 informs the transport that the mux strategy + // did not find the right reply handler. return 0; } @@ -80,9 +83,8 @@ TAO_Exclusive_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) this->rd_ = 0; // Dispatch the reply. - int result = rd->dispatch_reply (params); - - return result; + // Returns 1 on success, -1 on failure. + return rd->dispatch_reply (params); } /*TAO_GIOP_Message_State * diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index fea6cdfdb40..1370f1dfb65 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -401,13 +401,18 @@ TAO_IIOP_Transport::process_message (void) // is going to take a look please contact bala@cs.wustl.edu // for details on this-- Bala + + if (result == -1) { + // Something really critical happened, we will forget about + // every reply on this connection. if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, ACE_TEXT ("TAO (%P|%t) : IIOP_Client_Transport::") ACE_TEXT ("handle_client_input - ") ACE_TEXT ("dispatch reply failed\n"))); + this->messaging_object_->reset (); this->tms_->connection_closed (); return -1; @@ -416,7 +421,16 @@ TAO_IIOP_Transport::process_message (void) if (result == 0) { this->messaging_object_->reset (); - return 0; + + // The reply dispatcher was no longer registered. + // This can happened when the request/reply + // times out. + // To throw away all registered reply handlers is + // not the right thing, as there might be just one + // old reply coming in and several valid new ones + // pending. If we would invoke <connection_closed> + // we would throw away also the valid ones. + //return 0; } diff --git a/TAO/tao/Muxed_TMS.cpp b/TAO/tao/Muxed_TMS.cpp index f82ec718d79..54058e3b675 100644 --- a/TAO/tao/Muxed_TMS.cpp +++ b/TAO/tao/Muxed_TMS.cpp @@ -76,6 +76,9 @@ TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) { ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->lock_, -1); result = this->dispatcher_table_.unbind (params.request_id_, rd); + //ACE_DEBUG ((LM_DEBUG, + // "\n(%P|%t) TAO_Muxed_TMS::dispatch_reply: id = %d\n", + // params.request_id_)); } if (result != 0) @@ -86,10 +89,15 @@ TAO_Muxed_TMS::dispatch_reply (TAO_Pluggable_Reply_Params ¶ms) ACE_TEXT ("unbind dispatcher failed: result = %d\n"), result)); - return -1; + // This return value means that the mux strategy was not able + // to find a registered reply handler, either because the reply + // was not our reply - just forget about it - or it was ours, but + // the reply timed out - just forget about the reply. + return 0; } // Dispatch the reply. + // They return 1 on success, and -1 on failure. return rd->dispatch_reply (params); // No need for idling Transport, it would have got idle'd soon after diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp index 27fd2d23b68..5130eb21545 100644 --- a/TAO/tao/Strategies/SHMIOP_Transport.cpp +++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp @@ -380,7 +380,16 @@ TAO_SHMIOP_Transport::process_message (void) if (result == 0) { this->messaging_object_->reset (); - return 0; + + // The reply dispatcher was no longer registered. + // This can happened when the request/reply + // times out. + // To throw away all registered reply handlers is + // not the right thing, as there might be just one + // old reply coming in and several valid new ones + // pending. If we would invoke <connection_closed> + // we would throw away also the valid ones. + //return 0; } diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp index ac762b53c9e..0464c594dc9 100644 --- a/TAO/tao/Strategies/UIOP_Transport.cpp +++ b/TAO/tao/Strategies/UIOP_Transport.cpp @@ -382,7 +382,16 @@ TAO_UIOP_Transport::process_message (void) if (result == 0) { this->messaging_object_->reset (); - return 0; + + // The reply dispatcher was no longer registered. + // This can happened when the request/reply + // times out. + // To throw away all registered reply handlers is + // not the right thing, as there might be just one + // old reply coming in and several valid new ones + // pending. If we would invoke <connection_closed> + // we would throw away also the valid ones. + //return 0; } diff --git a/TAO/tao/Wait_On_Leader_Follower.cpp b/TAO/tao/Wait_On_Leader_Follower.cpp index 7a5e7dbade1..0188f32f49a 100644 --- a/TAO/tao/Wait_On_Leader_Follower.cpp +++ b/TAO/tao/Wait_On_Leader_Follower.cpp @@ -144,7 +144,13 @@ TAO_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time, ACE_TEXT ("TAO (%P|%t) - wait (follower) on <%x> ") ACE_TEXT ("cond == 0 || cond->wait (tv) == -1\n"), this->transport_)); - return -1; + + if (leader_follower.remove_follower (cond) == -1) + ACE_ERROR ((LM_ERROR, + "TAO (%P|%t) TAO_Wait_On_Leader_Follower::wait - " + "remove_follower failed for <%x>\n", cond)); + + return -1; } } } |