diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-01 18:20:57 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-01 18:20:57 +0000 |
commit | 36e0a60b8761c7abefa039028e9e16703df658ef (patch) | |
tree | 57a037b428821328abed9ed14c0dd8b7acb796fa | |
parent | 59d8f1866414337bffd966a052807cc3bc2592d5 (diff) | |
download | ATCD-36e0a60b8761c7abefa039028e9e16703df658ef.tar.gz |
ChangeLogTag:Tue Jun 1 13:14:00 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-99c | 24 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 58 | ||||
-rw-r--r-- | TAO/tao/Invocation.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Request_Mux_Strategy.cpp | 41 | ||||
-rw-r--r-- | TAO/tao/Request_Mux_Strategy.h | 68 | ||||
-rw-r--r-- | TAO/tao/Wait_Strategy.cpp | 112 | ||||
-rw-r--r-- | TAO/tests/MT_Client/client.cpp | 8 | ||||
-rw-r--r-- | TAO/tests/MT_Client/test.idl | 4 |
9 files changed, 184 insertions, 144 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 764562a61fa..c6ce7718afc 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,27 @@ +Tue Jun 1 13:14:00 1999 Carlos O'Ryan <coryan@cs.wustl.edu> + + * tao/Wait_Strategy.cpp: + More debugging messages, cleaned up the addition and removal of + followers from the follower set. + + * tao/Request_Mux_Strategy.h: + * tao/Request_Mux_Strategy.cpp: + Added new method to dispatch the reply and all its data. + + * tao/IIOP_Transport.cpp: + The reply is dispatched in a single operation. The version is + obtained from the stack + + * tao/ORB_Core.cpp: + Followers are removed by the follower thread when they wakeup. + + * tests/MT_Client/client.cpp: + Check that the return value is right + + * tests/MT_Client/test.idl: + * tao/Invocation.cpp: + Minor cosmetic fixes + Sun May 30 22:09:35 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu> * tao/ tao/* tao/IIOP_Transport.cpp diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 8584d0a0dd2..9e5ac394bfb 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -226,11 +226,13 @@ TAO_IIOP_Client_Transport::handle_client_input (int block) if (cdr == 0) return this->check_unexpected_data (); + TAO_GIOP_Version version; + TAO_GIOP::Message_Type message_type = TAO_GIOP::recv_message (this, *cdr, this->orb_core_, - this->version_, + version, block); switch (message_type) { @@ -274,6 +276,7 @@ TAO_IIOP_Client_Transport::handle_client_input (int block) case TAO_GIOP::CancelRequest: case TAO_GIOP::LocateRequest: case TAO_GIOP::CloseConnection: + default: // @@ Errors for the time being. // @@ this->reply_handler_->error (); ACE_ERROR_RETURN ((LM_ERROR, @@ -306,47 +309,38 @@ TAO_IIOP_Client_Transport::handle_client_input (int block) if (!cdr->read_ulong (request_id)) ACE_ERROR_RETURN ((LM_ERROR, - "%N:%l:(%P | %t):TAO_IIOP_Client_Transport::handle_client_input: " - "Failed to read request_id.\n"), + "TAO (%P|%t) : IIOP_Client_Transport::" + "handle_client_input - error while " + "reading request_id\n"), -1); if (!cdr->read_ulong (reply_status)) ACE_ERROR_RETURN ((LM_ERROR, - "%N:%l:(%P | %t):TAO_IIOP_Client_Transport::handle_client_input: " - "Failed to read request_status type.\n"), - -1); - - // Find the TAO_Reply_Handler for that request ID! - TAO_Reply_Dispatcher* reply_dispatcher = - this->rms_->find_dispatcher (request_id); - if (reply_dispatcher == 0) - ACE_ERROR_RETURN ((LM_ERROR, - "%N:%l:(%P | %t):TAO_IIOP_Client_Transport::handle_client_input: " - "Failed to find Reply Dispatcher.\n"), + "TAO (%P|%t) : IIOP_Client_Transport::" + "handle_client_input - error while " + "reading reply status\n"), -1); - // Init the Reply dispatcher with all the reply info. - reply_dispatcher->reply_status (reply_status); - // @@ reply_dispatcher->version (this->version ()); - // @@ reply->dispatcher->reply_context (reply_ctx); - reply_dispatcher->cdr (cdr); - - // @@ Alex: I think that a better interface is: - // reply_dispatcher->dispatch_reply (reply_status, version, - // reply_ctx, cdr); - // That way we don't need to keep state in the dispatch_reply - // object, careful about the lifetime of the reply_ctx and CDR - // objects because they allocate memory.... - - // Handle the reply. - if (reply_dispatcher->dispatch_reply () == -1) + // @@ Alex: for some reason this was causing a crash with the + // leader-follower wait strategy. Somehow it seems like the rms + // still has a pointer to an object that was already destroyed + // (i.e. the stack was unrolled on the thread waiting for this + // event), since this is only needed for *true* asynchronous + // messaging. + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - dispatching reply <%x>\n", this)); + if (this->rms_->dispatch_reply (request_id, + reply_status, + version, + reply_ctx, + cdr) != 0) { ACE_ERROR_RETURN ((LM_ERROR, - "TAO (%P|%t) %N:%l handle_client_input: " - "dispatch reply.\n"), + "TAO (%P|%t) : IIOP_Client_Transport::" + "handle_client_input - " + "dispatch reply failed\n"), -1); - return -1; } + // This is a NOOP for the Exclusive request case, but it actually // destroys the stream in the muxed case. this->destroy_cdr_stream (cdr); diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index 0544cffce70..e620fa54d37 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -773,6 +773,7 @@ TAO_GIOP_Twoway_Invocation::invoke_i (CORBA::Environment &ACE_TRY_ENV) // fully. // @@ Check for return value -1 here !!! (Alex). int reply_error = 0; + while (!this->transport_->message_received () && reply_error == 0) reply_error = this->transport_->wait_for_reply (); @@ -921,7 +922,8 @@ TAO_GIOP_Locate_Request_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) this->close_connection (); - ACE_THROW_RETURN (CORBA::COMM_FAILURE (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), + ACE_THROW_RETURN (CORBA::COMM_FAILURE (TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_MAYBE), TAO_INVOKE_EXCEPTION); } @@ -940,7 +942,8 @@ TAO_GIOP_Locate_Request_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) this->transport_->close_connection (); if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO: (%P|%t) bad Response header\n")); - ACE_THROW_RETURN (CORBA::COMM_FAILURE (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE), + ACE_THROW_RETURN (CORBA::COMM_FAILURE (TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_MAYBE), TAO_INVOKE_EXCEPTION); } @@ -950,7 +953,8 @@ TAO_GIOP_Locate_Request_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) break; case TAO_GIOP_UNKNOWN_OBJECT: - ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), + ACE_THROW_RETURN (CORBA::OBJECT_NOT_EXIST (TAO_DEFAULT_MINOR_CODE, + CORBA::COMPLETED_YES), TAO_INVOKE_EXCEPTION); // NOTREACHED diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index d7e34d93ce1..a915b77e1e3 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -1008,9 +1008,8 @@ TAO_ORB_Core::unset_leader_wake_up_follower (void) // do it only if a follower is available and no leader is available { ACE_SYNCH_CONDITION* condition_ptr = this->get_next_follower (); - if (this->remove_follower (condition_ptr) == -1) + if (condition_ptr == 0 || condition_ptr->signal () == -1) return -1; - condition_ptr->signal (); } return 0; } diff --git a/TAO/tao/Request_Mux_Strategy.cpp b/TAO/tao/Request_Mux_Strategy.cpp index e6f3839719f..30803803623 100644 --- a/TAO/tao/Request_Mux_Strategy.cpp +++ b/TAO/tao/Request_Mux_Strategy.cpp @@ -1,6 +1,7 @@ // $Id$ #include "tao/Request_Mux_Strategy.h" +#include "tao/Reply_Dispatcher.h" // @@ Alex: there is another aspect that is controlled by this // strategy: the demuxed version must idle() the transport @@ -54,12 +55,15 @@ TAO_Muxed_RMS::bind_dispatcher (CORBA::ULong request_id, return 0; } -// Find the Reply Dispatcher. -TAO_Reply_Dispatcher* -TAO_Muxed_RMS::find_dispatcher (CORBA::ULong request_id) +int +TAO_Muxed_RMS::dispatch_reply (CORBA::ULong request_id, + CORBA::ULong reply_status, + const TAO_GIOP_Version& version, + TAO_GIOP_ServiceContextList& reply_ctx, + TAO_InputCDR* cdr) { // @@ - return 0; + return -1; } void @@ -96,6 +100,7 @@ TAO_Exclusive_RMS::~TAO_Exclusive_RMS (void) CORBA::ULong TAO_Exclusive_RMS::request_id (void) { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, 0); return this->request_id_generator_++; } @@ -104,29 +109,38 @@ int TAO_Exclusive_RMS::bind_dispatcher (CORBA::ULong request_id, TAO_Reply_Dispatcher *rd) { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, -1); this->request_id_ = request_id; this->rd_ = rd; return 0; } -// Find the Reply Handler. -TAO_Reply_Dispatcher * -TAO_Exclusive_RMS::find_dispatcher (CORBA::ULong request_id) +int +TAO_Exclusive_RMS::dispatch_reply (CORBA::ULong request_id, + CORBA::ULong reply_status, + const TAO_GIOP_Version& version, + TAO_GIOP_ServiceContextList& reply_ctx, + TAO_InputCDR* cdr) { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, this->lock_, -1); if (this->request_id_ != request_id) - ACE_ERROR_RETURN ((LM_ERROR, - "%N:%l:TAO_Exclusive_RMS::find_handler: " - "Failed to find the handler\n"), - 0); + return -1; - return this->rd_; -} + TAO_Reply_Dispatcher *rd = this->rd_; + this->request_id_ = 0xdeadbeef; // @@ What is a good value??? + this->rd_ = 0; + // @@ Use a single operation for all of this... + rd->reply_status (reply_status); + rd->cdr (cdr); + return rd->dispatch_reply (); +} // Set the CDR stream. void TAO_Exclusive_RMS::set_cdr_stream (TAO_InputCDR *cdr) { + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); this->cdr_ = cdr; } @@ -134,5 +148,6 @@ TAO_Exclusive_RMS::set_cdr_stream (TAO_InputCDR *cdr) void TAO_Exclusive_RMS::destroy_cdr_stream (TAO_InputCDR *) { + ACE_GUARD (ACE_SYNCH_MUTEX, ace_mon, this->lock_); this->cdr_ = 0; } diff --git a/TAO/tao/Request_Mux_Strategy.h b/TAO/tao/Request_Mux_Strategy.h index 900f63a300e..7ebf6e7d7d5 100644 --- a/TAO/tao/Request_Mux_Strategy.h +++ b/TAO/tao/Request_Mux_Strategy.h @@ -19,12 +19,15 @@ #ifndef TAO_REQUEST_MUX_STRATEGY_H #define TAO_REQUEST_MUX_STRATEGY_H -#include "tao/CDR.h" +#include "tao/GIOP.h" -// Forward declarations. +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ class TAO_Reply_Dispatcher; - +class TAO_GIOP_Version; +class TAO_InputCDR; class TAO_Export TAO_Request_Mux_Strategy { @@ -56,8 +59,13 @@ public: TAO_Reply_Dispatcher *rh) = 0; // Bind the dispatcher with the request id. - virtual TAO_Reply_Dispatcher* find_dispatcher (CORBA::ULong request_id) = 0; - // Find the Reply Dispatcher. + virtual int dispatch_reply (CORBA::ULong request_id, + CORBA::ULong reply_status, + const TAO_GIOP_Version& version, + TAO_GIOP_ServiceContextList& reply_ctx, + TAO_InputCDR* cdr) = 0; + // Dispatch the reply for <request_id>, cleanup any resources + // allocated for that request. // = "Factory methods" to obtain the CDR stream, in the Muxed case // the factory simply allocates a new one, in the Exclusive case @@ -95,28 +103,17 @@ public: virtual ~TAO_Muxed_RMS (void); // Destructor. + // = The TAO Request Strategy methods... virtual CORBA::ULong request_id (void); - // Generate and return an unique request id for the current - // invocation. - virtual int bind_dispatcher (CORBA::ULong request_id, TAO_Reply_Dispatcher *rh); - // Bind the dispatcher with the request id. - - virtual TAO_Reply_Dispatcher* find_dispatcher (CORBA::ULong request_id); - // Find the Reply Dispatcher. - - // virtual TAO_InputCDR *cdr_stream (void); - // Create a new CDR stream and return. - + virtual int dispatch_reply (CORBA::ULong request_id, + CORBA::ULong reply_status, + const TAO_GIOP_Version& version, + TAO_GIOP_ServiceContextList& reply_ctx, + TAO_InputCDR* cdr); virtual void set_cdr_stream (TAO_InputCDR *cdr); - // Set the CDR stream. - - // virtual TAO_InputCDR *cdr_stream (void); - // Get the CDR stream. - virtual void destroy_cdr_stream (TAO_InputCDR *); - // Delete the cdr stream. protected: // @@ HASH TABLE??? @@ -138,31 +135,22 @@ public: virtual ~TAO_Exclusive_RMS (void); // Destructor. + // = The TAO Request Strategy methods... virtual CORBA::ULong request_id (void); - // Generate and return an unique request id for the current - // invocation. We can actually return a predecided ULong, since we - // allow only one invocation over this connection at a time. - virtual int bind_dispatcher (CORBA::ULong request_id, TAO_Reply_Dispatcher *rh); - // Bind the dispatcher with the request id. - - virtual TAO_Reply_Dispatcher* find_dispatcher (CORBA::ULong request_id); - // Find the Reply Dispatcher. - - // virtual TAO_InputCDR *get_cdr_stream (void); - // Return the preallocated CDR stream. - + virtual int dispatch_reply (CORBA::ULong request_id, + CORBA::ULong reply_status, + const TAO_GIOP_Version& version, + TAO_GIOP_ServiceContextList& reply_ctx, + TAO_InputCDR* cdr); virtual void set_cdr_stream (TAO_InputCDR *cdr); - // Set the CDR stream. - - // virtual TAO_InputCDR *cdr_stream (void); - // Get the CDR stream. - virtual void destroy_cdr_stream (TAO_InputCDR *); - // NO-OP function. protected: + ACE_SYNCH_MUTEX lock_; + // Synchronize the internal state + CORBA::ULong request_id_generator_; // Used to generate a different request_id on each call to // request_id() diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp index f7f5e19ac58..6a85ab08c78 100644 --- a/TAO/tao/Wait_Strategy.cpp +++ b/TAO/tao/Wait_Strategy.cpp @@ -141,14 +141,24 @@ TAO_Wait_On_Leader_Follower::send_request (TAO_ORB_Core *orb_core, TAO_OutputCDR &stream, int two_way) { - if (!two_way) - { - return TAO_Wait_Strategy::send_request (orb_core, - stream, - two_way); - } + { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, + orb_core->leader_follower_lock (), -1); - // = Two way call. + // The last request may have left this unitialized + this->reply_received_ = 0; + + // Set the state so that we know we're looking for a response. + this->expecting_response_ = two_way; + + // remember in which thread the client connection handler was running + this->calling_thread_ = ACE_Thread::self (); + + //if (TAO_debug_level > 0) + //ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - sending request for <%x>\n", + //this->transport_)); + + } // @@ Should we do here that checking for the difference in the // Reactor used??? (Alex). @@ -164,31 +174,24 @@ TAO_Wait_On_Leader_Follower::send_request (TAO_ORB_Core *orb_core, // fixed... // Obtain the lock. - { - ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, - orb_core->leader_follower_lock (), -1); - - // The last request may have left this unitialized - this->reply_received_ = 0; - - // Set the state so that we know we're looking for a response. - this->expecting_response_ = 1; + // Send the request + int result = + TAO_Wait_Strategy::send_request (orb_core, + stream, + two_way); - // remember in which thread the client connection handler was running - this->calling_thread_ = ACE_Thread::self (); + if (result == -1) + { + ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, + orb_core->leader_follower_lock (), -1); - if (TAO_debug_level > 0) - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - Wait_On_LF::send_request " - "expecting reply for <%x:%d>\n", - this, this->transport_->handle ())); - - } + this->reply_received_ = 0; + this->expecting_response_ = 0; + this->calling_thread_ = ACE_OS::NULL_thread; - // Send the request - return TAO_Wait_Strategy::send_request (orb_core, - stream, - two_way); + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - failed request for <%x>\n", + this->transport_)); + } } int @@ -231,6 +234,9 @@ TAO_Wait_On_Leader_Follower::wait (void) { // = Wait as a follower. + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - wait (follower) on <%x>\n", + this->transport_)); + // wait until we have input available or there is no leader, in // which case we must become the leader anyway.... // @@ Alex: I am uncertain about how many condition variables @@ -239,15 +245,14 @@ TAO_Wait_On_Leader_Follower::wait (void) // should be one per-connection. I think the first case is // the "Right Thing"[tm] ACE_SYNCH_CONDITION* cond = - this->cond_response_available () -; + this->cond_response_available (); + // Add ourselves to the list, do it only once because we can // wake up multiple times from the CV loop if (orb_core->add_follower (cond) == -1) ACE_ERROR ((LM_ERROR, - "TAO:%N:%l:(%P|%t):TAO_Wait_On_Leader_Follower::wait: " - "Failed to add a follower <%x>\n", - cond)); + "TAO (%P|%t) TAO_Wait_On_Leader_Follower::wait - " + "add_follower failed for <%x>\n", cond)); while (!this->reply_received_ && orb_core->leader_available ()) { @@ -255,6 +260,14 @@ TAO_Wait_On_Leader_Follower::wait (void) return -1; } + if (orb_core->remove_follower (cond) == -1) + ACE_ERROR ((LM_ERROR, + "TAO (%P|%t) TAO_Wait_On_Leader_Follower::wait - " + "remove_follower failed for <%x>\n", cond)); + + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - done (follower:%d) on <%x>\n", + this->reply_received_, this->transport_)); + // Now somebody woke us up to become a leader or to handle // our input. We are already removed from the follower queue. if (this->reply_received_ == 1) @@ -273,14 +286,12 @@ TAO_Wait_On_Leader_Follower::wait (void) this->expecting_response_ = 0; this->calling_thread_ = ACE_OS::NULL_thread; - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - L-F reply error\n")); - return -1; } // FALLTHROUGH // We only get here if we woke up but the reply is not complete // yet, time to assume the leader role.... + } // = Leader Code. @@ -293,9 +304,6 @@ TAO_Wait_On_Leader_Follower::wait (void) // This might increase the refcount of the leader. orb_core->set_leader_thread (); - // ACE_DEBUG ((LM_DEBUG, - // "TAO (%P|%t) - become the leader\n")); - // Release the lock. if (ace_mon.release () == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -310,9 +318,15 @@ TAO_Wait_On_Leader_Follower::wait (void) int result = 0; + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - wait (leader) on <%x>\n", + this->transport_)); + while (result >= 0 && this->reply_received_ == 0) result = orb_core->reactor ()->handle_events (); + ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - done (leader) on <%x>\n", + this->transport_)); + // Re-acquire the lock. if (ace_mon.acquire () == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -327,9 +341,6 @@ TAO_Wait_On_Leader_Follower::wait (void) // if there is an error in our input we should continue running the // loop in another thread. - // ACE_DEBUG ((LM_DEBUG, - // "TAO (%P|%t) - elect a follower\n")); - if (orb_core->unset_leader_wake_up_follower () == -1) ACE_ERROR_RETURN ((LM_ERROR, "TAO:%N:%l:(%P|%t):TAO_Client_Connection_Handler::send_request: " @@ -345,8 +356,6 @@ TAO_Wait_On_Leader_Follower::wait (void) result = 0; if (this->reply_received_ == -1) { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - L-F reply error\n")); result = -1; } @@ -369,6 +378,9 @@ TAO_Wait_On_Leader_Follower::handle_input (void) ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, ace_mon, orb_core->leader_follower_lock (), -1); + // ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - reading reply <%x>\n", + // this->transport_)); + // A message is received but not data was sent, flag this as an // error, but we should do more.... // @@ Alex: this could be a CloseConnection message or something @@ -378,8 +390,8 @@ TAO_Wait_On_Leader_Follower::handle_input (void) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - Wait_On_LF::handle_input, " - "unexpected <%x:%d>\n", - this, this->transport_->handle ())); + "unexpected on <%x>\n", + this->transport_)); return -1; } @@ -402,6 +414,9 @@ TAO_Wait_On_Leader_Follower::handle_input (void) result = 0; } + //ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - waking up <%x>\n", + // this->transport_)); + this->wake_up (); return result; @@ -467,9 +482,6 @@ TAO_Wait_On_Leader_Follower::wake_up (void) ACE_SYNCH_CONDITION* cond = this->cond_response_available (); - // Ignore any errors, may have been removed by another thread... - (void) this->transport_->orb_core ()->remove_follower (cond); - if (cond != 0) (void) cond->signal (); } diff --git a/TAO/tests/MT_Client/client.cpp b/TAO/tests/MT_Client/client.cpp index d9680c0d511..a58df815751 100644 --- a/TAO/tests/MT_Client/client.cpp +++ b/TAO/tests/MT_Client/client.cpp @@ -132,6 +132,7 @@ Client::svc (void) { ACE_TRY_NEW_ENV { +#if 0 // If we are using a global ORB this is a nop, otherwise it // initializes the ORB resources for this thread. int argc = 0; @@ -139,6 +140,7 @@ Client::svc (void) CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV); ACE_TRY_CHECK; +#endif CORBA::Long number = 0; @@ -147,12 +149,14 @@ Client::svc (void) number = server_->get_number (ACE_TRY_ENV); ACE_TRY_CHECK; + ACE_ASSERT (number == 931232); + // ACE_DEBUG ((LM_DEBUG, // "get_number = %d\n", // number)); - server_->test_method (ACE_TRY_ENV); - ACE_TRY_CHECK; + //server_->test_method (ACE_TRY_ENV); + //ACE_TRY_CHECK; if (TAO_debug_level > 0 && i % 100 == 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) iteration = %d\n", i)); diff --git a/TAO/tests/MT_Client/test.idl b/TAO/tests/MT_Client/test.idl index 5b12394efa7..3b80a16e3c6 100644 --- a/TAO/tests/MT_Client/test.idl +++ b/TAO/tests/MT_Client/test.idl @@ -5,8 +5,8 @@ interface Simple_Server { void test_method (); - + long get_number (); - + void shutdown (); }; |