summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-20 23:46:00 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-20 23:46:00 +0000
commit1fb4ceb38ed63055dd2b296598c0cd7ba22c6aca (patch)
tree6c1eb5b108289a6e1b41b967ab56c265fada1437
parent0fc4c82f1c5146f952fb83cf2c25dc9e6d23a4f3 (diff)
downloadATCD-1fb4ceb38ed63055dd2b296598c0cd7ba22c6aca.tar.gz
ChangeLogTag: Fri Jun 20 19:45:07 2003 Irfan Pyarali <irfan@oomworks.com>
-rw-r--r--TAO/ChangeLog293
-rw-r--r--TAO/tao/Acceptor_Impl.cpp81
-rw-r--r--TAO/tao/Asynch_Reply_Dispatcher_Base.cpp2
-rw-r--r--TAO/tao/Asynch_Reply_Dispatcher_Base.i6
-rw-r--r--TAO/tao/Cache_Entries.cpp15
-rw-r--r--TAO/tao/Connect_Strategy.cpp23
-rw-r--r--TAO/tao/Connect_Strategy.h10
-rw-r--r--TAO/tao/Connection_Handler.cpp413
-rw-r--r--TAO/tao/Connection_Handler.h35
-rw-r--r--TAO/tao/Connection_Handler.inl15
-rw-r--r--TAO/tao/Connector_Impl.cpp7
-rw-r--r--TAO/tao/Default_Protocols_Hooks.cpp20
-rw-r--r--TAO/tao/IIOP_Connection_Handler.cpp54
-rw-r--r--TAO/tao/IIOP_Connection_Handler.h8
-rw-r--r--TAO/tao/IIOP_Connector.cpp123
-rw-r--r--TAO/tao/IIOP_Transport.cpp109
-rw-r--r--TAO/tao/IIOP_Transport.h23
-rw-r--r--TAO/tao/Invocation.cpp13
-rw-r--r--TAO/tao/LF_CH_Event.cpp14
-rw-r--r--TAO/tao/LF_CH_Event.h22
-rw-r--r--TAO/tao/LF_Connect_Strategy.cpp3
-rw-r--r--TAO/tao/LF_Event.h3
-rw-r--r--TAO/tao/Makefile.bor1
-rw-r--r--TAO/tao/Makefile.tao289
-rw-r--r--TAO/tao/Notify_Handler.cpp12
-rw-r--r--TAO/tao/PortableServer/AMH_Response_Handler.cpp23
-rw-r--r--TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp197
-rw-r--r--TAO/tao/TAO.dsp8
-rw-r--r--TAO/tao/TAO_Static.dsp8
-rw-r--r--TAO/tao/Thread_Lane_Resources.cpp55
-rw-r--r--TAO/tao/Thread_Per_Connection_Handler.cpp6
-rw-r--r--TAO/tao/Transport.cpp419
-rw-r--r--TAO/tao/Transport.h187
-rw-r--r--TAO/tao/Transport.inl25
-rw-r--r--TAO/tao/Transport_Cache_Manager.cpp39
-rw-r--r--TAO/tao/Transport_Cache_Manager.h22
-rw-r--r--TAO/tao/Transport_Cache_Manager.inl5
-rw-r--r--TAO/tao/Wait_On_Read.cpp6
-rw-r--r--TAO/tao/tao.mpc1
-rw-r--r--TAO/tests/Connection_Timeout/client.dsp22
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/client.dsp22
-rw-r--r--TAO/tests/MProfile_Connection_Timeout/server.dsp22
-rw-r--r--TAO/tests/MT_BiDir/client.dsp26
-rw-r--r--TAO/tests/MT_BiDir/server.dsp26
-rw-r--r--TAO/tests/ORB_shutdown/server.dsp22
-rw-r--r--TAO/tests/TAO_Tests.dsw464
46 files changed, 1484 insertions, 1715 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 211f189427e..e8904935cf0 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,296 @@
+Fri Jun 20 19:45:07 2003 Irfan Pyarali <irfan@oomworks.com>
+
+ * tao\Connection_Handler:
+
+ - Removed the incr_refcount() and decr_refcount() methods and
+ the related <reference_count_> and <refcount_lock_> members.
+ Also removed any explicit reference counting since now the
+ Reactor framework will handle this correctly.
+
+ - Removed all asserts for a valid <transport_> since now the
+ lifetime of the handler and the transport are the same.
+
+ - Removed connection_close_wait() since this state is no longer
+ needed.
+
+ - handle_close_eh() is no longer required since we no longer
+ rely on the Reactor calling handle_close().
+
+ - Moved the call to release_os_resources() from decr_refcount()
+ to the destructor.
+
+ - Mega-simplified transport() method since the transport will
+ only be set once.
+
+ - Call to Transport::send_connection_closed_notifications() was
+ moved to Connection_Handler::close_connection_eh() to ensure it
+ gets called in all cases when the handler is closed.
+
+ - close_connection_eh() was also super-simplified. Now it
+ simply purges the handler from the connection cache and removes
+ the handler from the Reactor.
+
+ - Made the destructor public since this class is no longer
+ (directly) reference counted.
+
+ * tao\IIOP_Connection_Handler:
+
+ - Added close() method that will be called by the Acceptor or
+ Connector when connection establishment fails.
+
+ - No need to reference count the transport. Handlers and
+ transports now have the same lifespan. Transport in created in
+ the constructor and deleted in the destructor.
+
+ - handle_input() and handle_output() intercept any errors from
+ handle_input_eh() and handle_output_eh() respectively and
+ close_connection().
+
+ - Assert that handle_close() no longer gets called.
+
+ - Added handle_timeout(). We don't use this upcall from the
+ Reactor. However, we should override this since the base
+ class returns -1 which will result in handle_close() getting
+ called.
+
+ * tao\Transport:
+
+ - The Transport class no longer needs to inherit from
+ TAO_Synch_Refcountable. The reference counting is provided by
+ the Event_Handler class.
+
+ - Replaced the _duplicate() and release() methods with
+ add_reference() and remove_reference() methods. This matches
+ the signature of the reference counting methods on the base
+ Event_Handler class.
+
+ - Changed provide_handler() to simple provide the related
+ connection handler.
+
+ - register_handler() was made virtual and register_handler_i()
+ was removed since there was no locking required. Same was done
+ for recv() and send().
+
+ - Removed:
+
+ close_connection_shared()
+ close_connection_no_purge()
+ close_connection_i(),
+ connection_handler_closing()
+ check_event_handler_i()
+ invalidate_event_handler_i()
+
+ since they were no longer needed.
+
+ - Renamed handle_input_i() to handle_input().
+
+ - Made send_connection_closed_notifications() public.
+
+ - No need for:
+
+ send_message_block_chain()
+ send_message_shared()
+ schedule_output_i()
+ drain_queue_helper()
+ handle_timeout()
+ check_buffering_constraints_i()
+ notify_reactor()
+
+ to call check_event_handler_i() since the handler is always
+ valid.
+
+ - No need for to call send_connection_closed_notifications() in
+ case of errors since it will get called when the handler is
+ closed.
+
+ - No need for process_parsed_messages() to do any explicit
+ reference counting since now the Reactor framework will handle
+ this correctly.
+
+ - No need for notify_reactor() to create a Notify_Handler. The
+ Reactor framework already does the proper reference counting for
+ notifications.
+
+ * tao\IIOP_Transport:
+
+ - invalidate_event_handler_i() no longer needed.
+
+ - Override send() and recv() instead of send_i() and recv_i().
+
+ - No need for reference counting the connection handler since
+ the lifespan of the connection handler is tied to the lifespan
+ of the transport.
+
+ - register_handler_i() no longer needed.
+
+ - No need for:
+
+ send_request()
+ send_message_shared()
+ tear_listen_point_list()
+ get_listen_point()
+
+ to call check_event_handler_i() since the handler is always
+ valid.
+
+ * tao\Acceptor_Impl.cpp (activate_svc_handler):
+
+ Made several changes to this method. Now the sequence is:
+
+ - At the start of the method, the service handler has been
+ created and the new connection has been accepted. #REFCOUNT# is
+ one at this point.
+
+ - Cache handler: if successful, #REFCOUNT# is two at this
+ point. If failure, call close on handler.
+
+ - Activate/register handler: if successful: #REFCOUNT# is three
+ at this point. We can let go of our reference. If failure,
+ remove handler from cache and call close on handler.
+
+ - Success completion of method: #REFCOUNT# is two at this point.
+
+ * tao\IIOP_Connector.cpp (make_connection):
+
+ Made several changes to this method. Now the sequence is:
+
+ - The connect() call creates the service handler. There are
+ three possibilities: (a) connection succeeds immediately - in
+ this case, the #REFCOUNT# on the handler is one; (b) connection
+ completion is pending - in this case, the #REFCOUNT# on the
+ handler is also one; (c) connection fails immediately - in this
+ case, the #REFCOUNT# on the handler is zero since close() gets
+ called on the handler;
+
+ - If there is no immediate result, wait for completion. In this
+ case, we add to the #REFCOUNT# since we are going to wait on a
+ variable in the handler to changes, signifying success or
+ failure.
+
+ - When the wait completes, check if the handler has been closed.
+ Irrespective of success or failure, remove the #REFCOUNT#
+ added for waiting.
+
+ - In case of failure, check if the connection has been closed.
+ Handler has not been closed - close it now. This happens when
+ there is a problem while waiting other than the connection
+ failure.
+
+ - If the connection has be successfully connected, add the
+ handler to connection cache.
+
+ - Failure in adding to cache, close the handler.
+
+ - If the wait strategy wants us to be registered with the reactor
+ then we do so. If registeration is required and it succeeds,
+ #REFCOUNT# becomes two.
+
+ - In case of reactor registration failures, purge from the
+ connection cache and close the handler.
+
+ - In case of success, handover the transport pointer to the
+ Invocation class.
+
+ * tao\Transport_Cache_Manager (close):
+
+ Previously, close() was returning a handle set and a set of
+ event handlers. This was changed such the only a set of
+ connection handlers is returned since the previous parameters
+ are no longer necessary.
+
+ Also in purge(), there is no need to actually purge the handler
+ since they will be purged when the handlers close. This also
+ removes the need for Transport::close_connection_no_purge().
+ Transport_Cache_Manager no longer needs to be friends with the
+ Transport.
+
+ * tao\Thread_Lane_Resources.cpp (finalize):
+
+ We now close the transport cache and return the handlers that
+ were still registered. The cache will decrease the #REFCOUNT#
+ on the handler when it removes the handler from cache. However,
+ #REFCOUNT# is increased when the handler is placed in the
+ handler set. Then we go through the handler set, closing the
+ connections and removing the references. Finally the connection
+ is closed. There is also a potential removal from the Reactor.
+ Finally, the #REFCOUNT# related to the handler set decreases.
+
+ * tao\Notify_Handler:
+
+ These files are no longer required since the Reactor framework
+ does the correct reference counting for notifications.
+
+ * tao\LF_CH_Event:
+ * tao\LF_Event:
+
+ Removed the LFS_CONNECTION_CLOSE_WAIT state since it is no
+ longer needed.
+
+ * tao\Connector_Impl.cpp (make_svc_handler):
+
+ Removed extra call to sh->incr_refcount() since
+ *_Connector::make_connection() now does the right thing.
+
+ * tao\Connect_Strategy:
+
+ Removed Connect_Strategy::post_failed_connect() since
+ *_Connector::make_connection() now does the right thing.
+
+ * tao\Asynch_Reply_Dispatcher_Base.cpp:
+ * tao\Asynch_Reply_Dispatcher_Base.i:
+ * tao\Cache_Entries.cpp:
+ * tao\Invocation.cpp:
+ * tao\Transport.cpp:
+ * tao\Notify_Handler.cpp:
+ * tao\Thread_Per_Connection_Handler.cpp:
+ * tao\PortableServer\AMH_Response_Handler.cpp:
+
+ Replace calls to Transport::_duplicate() and
+ Transport::release() with new Transport::add_handler() and
+ Transport::remove_handler() methods respectively.
+
+ * tests\TAO_Tests.dsw:
+
+ Added several missing tests:
+
+ - AMH_Exceptions_Test
+ - AMH_Oneway_Test
+ - Abstract Interface
+ - Bug_1482_Regression
+ - Collocation_Test
+ - Connect_Strategy_Test
+ - Connection_Timeout
+ - File_IO
+ - MProfile_Connection_Timeout
+ - MT_BiDir
+ - Manipulation
+ - Muxed_GIOP_Versions
+ - Nested_Upcall_Crash
+ - No_Server_MT_Connect_Test
+ - ORB_shutdown
+ - Objref_Sequence_Test
+ - Oneway_Buffering
+ - Stack_Recursion
+ - Strategies
+ - Two_Objects
+
+ * tao\Makefile.bor:
+ * tao\Makefile.tao:
+ * tao\TAO.dsp:
+ * tao\TAO_Static.dsp:
+ * tao\tao.mpc:
+
+ Removed Notify_Handler* from project/makefiles.
+
+ * tests\Connection_Timeout\client.dsp:
+ * tests\MProfile_Connection_Timeout\client.dsp:
+ * tests\MProfile_Connection_Timeout\server.dsp:
+ * tests\MT_BiDir\client.dsp:
+ * tests\MT_BiDir\server.dsp:
+ * tests\ORB_shutdown\server.dsp:
+
+ Fixed the above project files.
+
Tue May 27 17:37:21 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
* orbsvcs/orbsvcs/IFRService/ComponentDef_i.cpp:
diff --git a/TAO/tao/Acceptor_Impl.cpp b/TAO/tao/Acceptor_Impl.cpp
index d290d2f4157..dfd5849f1b0 100644
--- a/TAO/tao/Acceptor_Impl.cpp
+++ b/TAO/tao/Acceptor_Impl.cpp
@@ -87,6 +87,9 @@ template <class SVC_HANDLER> int
TAO_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *sh,
void *arg)
{
+ // Here the service handler has been created and the new connection
+ // has been accepted. #REFCOUNT# is one at this point.
+
if (this->ACE_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (sh,
arg) == -1)
return -1;
@@ -94,31 +97,93 @@ TAO_Concurrency_Strategy<SVC_HANDLER>::activate_svc_handler (SVC_HANDLER *sh,
// The service handler has been activated. Now cache the handler.
if (sh->add_transport_to_cache () == -1)
{
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Could not add the handler to Cache \n")));
+ // Adding to the cache fails, close the handler.
+ sh->close ();
+
+ // #REFCOUNT# is zero at this point.
+
+ if (TAO_debug_level > 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Could not add the handler to Cache \n")));
+ }
+
+ return -1;
}
+ // Registration with cache is successful, #REFCOUNT# is two at this
+ // point.
+
TAO_Server_Strategy_Factory *f =
this->orb_core_->server_factory ();
- // thread-per-connection concurrency model
+ int result = 0;
+ // Do we need to create threads?
if (f->activate_server_connections ())
{
+ // Thread-per-connection concurrency model
TAO_Thread_Per_Connection_Handler *tpch = 0;
ACE_NEW_RETURN (tpch,
TAO_Thread_Per_Connection_Handler (sh),
-1);
- return tpch->activate (f->server_connection_thread_flags (),
- f->server_connection_thread_count ());
+ result = tpch->activate (f->server_connection_thread_flags (),
+ f->server_connection_thread_count ());
+ }
+ else
+ {
+ // Otherwise, it is the reactive concurrency model. We may want
+ // to register ourselves with the reactor. Call the register
+ // handler on the transport.
+ result =
+ sh->transport ()->register_handler ();
}
+ if (result != -1)
+ {
+ // Activation/registration successful: the handler has been
+ // registered with either the Reactor or the
+ // Thread-per-Connection_Handler, and the Transport Cache.
+ // #REFCOUNT# is three at this point.
+
+ // We can let go of our reference.
+ sh->transport ()->remove_reference ();
+ }
+ else
+ {
+ // Activation/registration failure. #REFCOUNT# is two at this
+ // point.
+
+ // Remove from cache.
+ sh->transport ()->purge_entry ();
+
+ // #REFCOUNT# is one at this point.
+
+ // Close handler.
+ sh->close ();
+
+ // #REFCOUNT# is zero at this point.
+
+ if (TAO_debug_level > 0)
+ {
+ const char *error = 0;
+ if (f->activate_server_connections ())
+ error = "could not activate new connection";
+ else
+ error = "could not register new connection in the reactor";
+
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - Concurrency_Strategy::activate_svc_handler, "
+ "%s\n", error));
+ }
+
+ return -1;
+ }
- // reactive concurrency model. We may want to register ourselves
- // with the reactor. Call the register handler on the transport.
- return sh->transport ()->register_handler ();
+ // Success: #REFCOUNT# is two at this point.
+ return result;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
index 21439f66a2a..47b6934cf0c 100644
--- a/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
+++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.cpp
@@ -39,7 +39,7 @@ TAO_Asynch_Reply_Dispatcher_Base::~TAO_Asynch_Reply_Dispatcher_Base (void)
if (this->transport_ != 0)
{
this->transport_->idle_after_reply ();
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
}
}
diff --git a/TAO/tao/Asynch_Reply_Dispatcher_Base.i b/TAO/tao/Asynch_Reply_Dispatcher_Base.i
index 2de4ec8c3ea..232f938f7ff 100644
--- a/TAO/tao/Asynch_Reply_Dispatcher_Base.i
+++ b/TAO/tao/Asynch_Reply_Dispatcher_Base.i
@@ -4,9 +4,11 @@ ACE_INLINE void
TAO_Asynch_Reply_Dispatcher_Base::transport (TAO_Transport *t)
{
if (this->transport_ != 0) {
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
}
- this->transport_ = TAO_Transport::_duplicate (t);
+
+ this->transport_ = t;
+ this->transport_->add_reference ();
}
diff --git a/TAO/tao/Cache_Entries.cpp b/TAO/tao/Cache_Entries.cpp
index df610a378f6..4e3ed2de940 100644
--- a/TAO/tao/Cache_Entries.cpp
+++ b/TAO/tao/Cache_Entries.cpp
@@ -11,14 +11,16 @@
ACE_RCSID(tao, Cache_Entries, "$Id$")
TAO_Cache_IntId::TAO_Cache_IntId (TAO_Transport *transport)
- : transport_ (TAO_Transport::_duplicate (transport)),
+ : transport_ (transport),
recycle_state_ (ACE_RECYCLABLE_UNKNOWN)
{
+ transport->add_reference ();
}
TAO_Cache_IntId::~TAO_Cache_IntId (void)
{
- TAO_Transport::release (this->transport_);
+ if (this->transport_)
+ this->transport_->remove_reference ();
}
TAO_Cache_IntId&
@@ -28,9 +30,12 @@ TAO_Cache_IntId::operator= (const TAO_Cache_IntId &rhs)
{
this->recycle_state_ = rhs.recycle_state_;
- TAO_Transport* old_transport = this->transport_;
- this->transport_ = TAO_Transport::_duplicate (rhs.transport_);
- TAO_Transport::release (old_transport);
+ TAO_Transport *old_transport = this->transport_;
+ this->transport_ = rhs.transport_;
+ if (this->transport_)
+ this->transport_->add_reference ();
+ if (old_transport)
+ old_transport->remove_reference ();
}
return *this;
diff --git a/TAO/tao/Connect_Strategy.cpp b/TAO/tao/Connect_Strategy.cpp
index f0cd072677f..8baa2aba950 100644
--- a/TAO/tao/Connect_Strategy.cpp
+++ b/TAO/tao/Connect_Strategy.cpp
@@ -15,26 +15,3 @@ TAO_Connect_Strategy::TAO_Connect_Strategy (TAO_ORB_Core *orb_core)
TAO_Connect_Strategy::~TAO_Connect_Strategy (void)
{
}
-
-int
-TAO_Connect_Strategy::post_failed_connect (TAO_Connection_Handler *ch,
- int is_finalized)
-{
- int ref = 0;
- if (!is_finalized)
- {
- // We need to do this here else we will leak memory. We cannot call
- // close_connection () for the following reasons
- // . the event_handlers get_handle () will return an
- // ACE_INVALID_HANDLE as things havent been shutdown
- // properly.
- // . We cannot relax the conditions since the conditions are right
- // for other natural cases ie. LF
- // Under these odd circumstances we need to take care of things
- // ourseleves
- ch->transport (0);
- ref = ch->decr_refcount ();
- }
-
- return ref;
-}
diff --git a/TAO/tao/Connect_Strategy.h b/TAO/tao/Connect_Strategy.h
index 3c57d269105..304f6f50201 100644
--- a/TAO/tao/Connect_Strategy.h
+++ b/TAO/tao/Connect_Strategy.h
@@ -66,16 +66,6 @@ public:
virtual int wait (TAO_Connection_Handler *ch,
ACE_Time_Value *val) = 0;
- /// Cleanup in case of failed connect.
- /*
- * Do any left over memory management or related things after
- * the connect failed. The argument @c is_successful indicates
- * whether the connection handler had undergone a sucessful state
- * completion or not.
- */
- virtual int post_failed_connect (TAO_Connection_Handler *ch,
- int is_finalized = 1);
-
protected:
/// Cached copy of the ORB core pointer
TAO_ORB_Core *orb_core_;
diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp
index b70d618860b..d4f88e081e9 100644
--- a/TAO/tao/Connection_Handler.cpp
+++ b/TAO/tao/Connection_Handler.cpp
@@ -24,14 +24,10 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core)
: orb_core_ (orb_core)
, transport_ (0)
, tss_resources_ (orb_core->get_tss_resources ())
- , reference_count_ (1)
{
// @@todo: We need to have a distinct option/ method in the resource
// factory for this and TAO_Transport.
- this->refcount_lock_ =
- this->orb_core_->resource_factory ()->create_cached_connection_lock ();
-
this->lock_ =
this->orb_core_->resource_factory ()->create_cached_connection_lock ();
@@ -40,15 +36,20 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core)
this->state_changed (TAO_LF_Event::LFS_CONNECTION_WAIT);
}
-
TAO_Connection_Handler::~TAO_Connection_Handler (void)
{
- ACE_ASSERT(this->transport_ == 0);
- ACE_ASSERT(this->reference_count_ == 0);
+ int result =
+ this->release_os_resources ();
+
+ if (result == -1 && TAO_debug_level)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - Connection_Handler::~Connection_Handler,"
+ "release_os_resources() failed %p\n"));
+ }
// @@ TODO Use auto_ptr<>
delete this->lock_;
- delete this->refcount_lock_;
}
@@ -126,8 +127,8 @@ TAO_Connection_Handler::svc_i (void)
(void) this->transport ()->update_transport ();
result =
- this->transport ()->handle_input_i (rh,
- max_wait_time);
+ this->transport ()->handle_input (rh,
+ max_wait_time);
if (result == -1 && errno == ETIME)
{
@@ -159,110 +160,20 @@ TAO_Connection_Handler::svc_i (void)
void
TAO_Connection_Handler::transport (TAO_Transport* transport)
{
- // The transport can be reset, but not changed!
- ACE_ASSERT(this->transport_ == 0 || transport == 0);
-
- TAO_Transport * tmp = 0;
- {
- // Make the change atomic
- ACE_GUARD (ACE_Lock, ace_mon, *this->lock_);
- tmp = this->transport_;
- this->transport_ = TAO_Transport::_duplicate (transport);
- }
-
- if (tmp != 0) {
- tmp->connection_handler_closing ();
- TAO_Transport::release (tmp);
- }
-}
+ // The transport should not have been set.
+ ACE_ASSERT (this->transport_ == 0);
-long
-TAO_Connection_Handler::incr_refcount (void)
-{
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->refcount_lock_, -1);
+ this->transport_ = transport;
- ACE_ASSERT(this->reference_count_ > 0);
- return ++this->reference_count_;
-}
-
-long
-TAO_Connection_Handler::decr_refcount (void)
-{
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->refcount_lock_, -1);
-
- if(--this->reference_count_ > 0)
- return this->reference_count_;
- }
-
- ACE_ASSERT(this->reference_count_ == 0);
-
-
- int r = this->release_os_resources ();
-
- if (r == -1 && TAO_debug_level)
- {
- ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - Connection_Handler::"
- "decr_refcount, release_os_resources() failed %p\n"));
- }
-
- delete this;
-
- return 0;
-}
-
-void
-TAO_Connection_Handler::connection_close_wait (void)
-{
- ACE_GUARD (ACE_Lock, ace_mon, *this->lock_);
- this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSE_WAIT);
-}
-
-
-
-int
-TAO_Connection_Handler::handle_close_eh (
- ACE_HANDLE handle, unsigned long reactor_mask, ACE_Event_Handler * eh)
-{
- ACE_HANDLE my_handle = eh->get_handle ();
-
- if (TAO_debug_level)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::handle_close_eh, "
- "(%d, %d)\n",
- my_handle, handle, reactor_mask));
- }
-
- if (this->close_connection () == 0)
- {
- if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "handle_close, connection closing or already closed\n",
- my_handle));
- return 0;
- }
-
- if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "handle_close, connection fully closed\n",
- my_handle));
-
- return 0;
+ // Enable reference counting on the event handler.
+ this->transport_->event_handler_i ()->reference_counting_policy ().value
+ (ACE_Event_Handler::Reference_Counting_Policy::ENABLED);
}
int
TAO_Connection_Handler::handle_output_eh (
ACE_HANDLE, ACE_Event_Handler * eh)
{
- // We are going to use the transport object to write data. Just make
- // sure that we have transport objects to proceed. This is
- // perfectly valid assert
- ACE_ASSERT (this->transport () != 0);
-
// Let the transport that it is going to be used
(void) this->transport ()->update_transport ();
@@ -281,7 +192,7 @@ TAO_Connection_Handler::handle_output_eh (
return_value = this->transport ()->handle_output ();
- this->pos_io_hook(return_value);
+ this->pos_io_hook (return_value);
if (return_value != 0)
{
resume_handle.set_flag (TAO_Resume_Handle::TAO_HANDLE_LEAVE_SUSPENDED);
@@ -294,11 +205,6 @@ int
TAO_Connection_Handler::handle_input_eh (
ACE_HANDLE h, ACE_Event_Handler * eh)
{
- // We are going to use the transport object to read data. Just make
- // sure that we have transport objects to proceed. This is
- // perfectly valid assert
- ACE_ASSERT (this->transport () != 0);
-
// Let the transport know that it is used
(void) this->transport ()->update_transport ();
@@ -308,20 +214,13 @@ TAO_Connection_Handler::handle_input_eh (
size_t t_id =
this->transport ()->id ();
-
- // Increase the reference count on the upcall that have passed us.
- //
- // REFCNT: Matches decr_refcount() in this function...
- long refcount = this->incr_refcount ();
- ACE_ASSERT (refcount > 0);
-
if (TAO_debug_level > 6)
{
ACE_HANDLE handle = eh->get_handle();
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Connection_Handler[%d]::handle_input, "
- "handle = %d/%d, refcount = %d\n",
- t_id, handle, h, refcount));
+ "handle = %d/%d\n",
+ t_id, handle, h));
}
TAO_Resume_Handle resume_handle (this->orb_core (),
@@ -331,220 +230,114 @@ TAO_Connection_Handler::handle_input_eh (
this->pre_io_hook (return_value);
if (return_value != 0)
- {
- // REFCNT: Matches incr_refcount() at the beginning...
- refcount = this->decr_refcount ();
- ACE_ASSERT (refcount >= 0);
- return return_value;
- }
-
-
- return_value = this->transport ()->handle_input_i (resume_handle);
+ return return_value;
- this->pos_io_hook(return_value);
+ return_value = this->transport ()->handle_input (resume_handle);
- // REFCNT: Matches incr_refcount() at the beginning...
- refcount = this->decr_refcount ();
- ACE_ASSERT (refcount >= 0);
+ this->pos_io_hook (return_value);
if (TAO_debug_level > 6)
{
ACE_HANDLE handle = eh->get_handle ();
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Connection_Handler[%d]::handle_input, "
- "handle = %d/%d, refcount = %d, retval = %d\n",
- t_id, handle, h, refcount, return_value));
- }
-
- if (return_value == -1 || refcount == 0)
- {
- // This is really a odd case. We could have a race condition if
- // we dont do this. Looks like this what happens
- // - imagine we have more than 1 server threads
- // - The server has got more than one connection from the
- // clients
- // - The clients make requests and they start dissappearing.
- // - The connections start getting closed
- // - at that point one of the server threads is woken up to
- // and handle_input () is called.
- // - the handle_input sees no data and so is about return a -1.
- // - if the handle is resumed, it looks like the oen more thread
- // gets access to the handle and the handle_input is called by
- // another thread.
- // - at that point of time if the thread returning -1 to the
- // reactor starts closing down the handler, bad things start
- // happening.
- // Looks subtle though. After adding this I dont see anything
- // bad happenin and so let us stick with it...
- resume_handle.set_flag (TAO_Resume_Handle::TAO_HANDLE_LEAVE_SUSPENDED);
+ "handle = %d/%d, retval = %d\n",
+ t_id, handle, h, return_value));
}
return return_value;
}
int
-TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler * eh)
+TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler *eh)
{
- // Perform a double checked locking on the underlying ACE_HANDLE
+ this->transport ()->send_connection_closed_notifications ();
+
+ // Save the ID for debugging messages
ACE_HANDLE handle = eh->get_handle ();
+ size_t id = this->transport ()->id ();
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Connection_Handler[%d]::"
+ "close_connection, purging entry from cache\n",
+ handle));
+ }
+ this->transport ()->purge_entry ();
- // If the handle is ACE_INVALID_HANDLE then there is no work to be
- // done in this function, and we return immediately. Returning 0
- // indicates the caller (handle_close() most likely), that there is
- // no work to be done.
- if (handle == ACE_INVALID_HANDLE)
+ // @@ This seems silly, but if we have no reason to be in the
+ // reactor, then we dont remove ourselves.
+ if (this->transport ()->wait_strategy ()->is_registered ())
{
- return 0;
+ ACE_Reactor *eh_reactor = eh->reactor ();
+
+ // These checks are valid as long as the ORB_Core is not
+ // shutdown. It is good to have these checks and they are valid
+ // for most of the cases. Please see below for exceptions
+ if (this->orb_core_->has_shutdown () == 0)
+ {
+ // The exception when these are not valid is for
+ // RTCORBA. With RTCORBA on, you can threads in different
+ // lanes creating handlers and registering them with reactor
+ // in those respective lanes. These threads could then even
+ // go away leaving the task of reclaiming these resources to
+ // the main thread. For the main thread that takes the
+ // responsibility of finalizing () the lanes and the pools,
+ // the calls and comparison make no sense.
+ ACE_Reactor * reactor =
+ this->transport()->orb_core()->reactor ();
+ ACE_ASSERT (eh_reactor == 0 || eh_reactor == reactor);
+
+ ACE_Reactor * orb_core_reactor = this->orb_core_->reactor ();
+ ACE_ASSERT (reactor == orb_core_reactor);
+
+ if (eh_reactor == 0)
+ eh_reactor = reactor;
+
+ ACE_UNUSED_ARG (orb_core_reactor);
+ }
+
+ // The Reactor must not be null, otherwise something else is
+ // horribly broken.
+ ACE_ASSERT (eh_reactor != 0);
+
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Connection_Handler[%d]::"
+ "close_connection, removing from the reactor\n",
+ handle));
+ }
+
+ eh_reactor->remove_handler (handle,
+ ACE_Event_Handler::ALL_EVENTS_MASK |
+ ACE_Event_Handler::DONT_CALL);
+
+ // Also cancel any timers, we may create those for time-limited
+ // buffering
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Connection_Handler[%d]::"
+ "close_connection, cancel all timers\n",
+ handle));
+ }
+
+ eh_reactor->cancel_timer (eh);
+
+ // @@ This seems silly, the reactor is a much better authority to
+ // find out if a handle is registered...
+ this->transport ()->wait_strategy ()->is_registered (0);
}
- size_t id = 0;
- {
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->lock_, 0);
-
- handle = eh->get_handle ();
-
- // Double-checked locking.
- if(handle == ACE_INVALID_HANDLE)
- {
- return 0;
- }
-
- // Before closing the socket we need to remove ourselves from the
- // Reactor. Sounds silly, as supposedly handle_close() was called
- // *BY* the Reactor, but the Reactor calls handle_close() with
- // only the masks implied by the handle_XXX() call that returned
- // -1, and it does *NOT* remove the Event Handler from all masks.
- // Furthermore, this method is also called outside the Reactor
- // event loop, for example, when an I/O error is detected during a
- // write().
-
- // The following assertion is true because:
- //
- //
- // 1) When a connection handler is initialized Transport is not zero
- // and the handle is *NOT* ACE_INVALID_HANDLE.
- // 2) The code here is run only once, if we get to this point the
- // handle was not ACE_INVALID_HANDLE
- // 3) this->transport() is only reset after we run this code
- // successfully
- //
- // Or: for this code to run the handle must have changed state from
- // something valid to ACE_INVALID_HANDLE, and the transport() field
- // will not be changed before that state transition.
- //
- ACE_ASSERT (this->transport () != 0);
-
- // Save the ID for debugging messages
- id = this->transport()->id ();
- if (TAO_debug_level)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, purging entry from cache\n",
- handle));
- }
- this->transport ()->purge_entry ();
-
- // @@ This seems silly, but if we have no reason to be in the
- // reactor, then we dont remove ourselves.
- if (this->transport ()->wait_strategy ()->is_registered ())
- {
- ACE_Reactor * eh_reactor = eh->reactor ();
-
- // These checks are valid as long as the ORB_Core is not
- // shutdown. It is good to have these checks and they are valid
- // for most of the cases. Please see below for exceptions
- if (this->orb_core_->has_shutdown () == 0)
- {
- // The exception when these are not valid is for RTCORBA. With
- // RTCORBA on, you can threads in different lanes creating
- // handlers and registering them with reactor in those
- // respective lanes. These threads could then even go away
- // leaving the task of reclaiming these resources to the main
- // thread. For the main thread that takes the responsibility
- // of finalizing () the lanes and the pools, the calls and
- // comparison make no sense.
- ACE_Reactor * reactor =
- this->transport()->orb_core()->reactor ();
- ACE_ASSERT (eh_reactor == 0 || eh_reactor == reactor);
-
- ACE_Reactor * orb_core_reactor = this->orb_core_->reactor ();
- ACE_ASSERT (reactor == orb_core_reactor);
-
- if (eh_reactor == 0)
- eh_reactor = reactor;
-
- ACE_UNUSED_ARG (orb_core_reactor);
- }
-
- // The Reactor must not be null, otherwise something else is
- // horribly broken.
- ACE_ASSERT (eh_reactor != 0);
-
- if (TAO_debug_level)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, removing from the reactor\n",
- handle));
- }
-
- int r =
- eh_reactor->remove_handler (handle,
- (ACE_Event_Handler::ALL_EVENTS_MASK
- | ACE_Event_Handler::DONT_CALL));
- if(r == -1 && TAO_debug_level)
- {
- ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, problem in remove_handler (%d)\n",
- handle, r));
- }
-
- // Also cancel any timers, we may create those for time-limited
- // buffering
- if (TAO_debug_level)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, cancel all timers and refcount [%d]\n",
- handle, reference_count_));
- }
- r = eh_reactor->cancel_timer (eh);
- if (r == -1 && TAO_debug_level)
- {
- ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, error cancelling timers\n",
- handle));
- }
-
- // @@ This seems silly, the reactor is a much better authority to
- // find out if a handle is registered...
- this->transport ()->wait_strategy ()->is_registered (0);
- }
-
- this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED);
- }
-
- ACE_ASSERT (this->transport () != 0);
-
- // Signal the transport that we will no longer have
- // a reference to it. This will eventually call
- // TAO_Transport::release ().
- this->transport (0);
-
- // The Reactor (or the Connector) holds an implicit reference.
- // REFCNT: Matches start count
- // REFCNT: only this or handle_input_eh() are called
- long refcount = this->decr_refcount ();
+ this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED);
if (TAO_debug_level)
{
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Connection_Handler[%d]::"
- "close_connection, refcount = %d\n",
- id, refcount));
+ "close_connection\n",
+ id));
}
return 1;
diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h
index 6401e86aca6..518d8e36161 100644
--- a/TAO/tao/Connection_Handler.h
+++ b/TAO/tao/Connection_Handler.h
@@ -17,12 +17,12 @@
#include "ace/pre.h"
#include "LF_CH_Event.h"
+#include "ace/Event_Handler.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-
class TAO_ORB_Core;
class TAO_ORB_Core_TSS_Resources;
class TAO_Transport;
@@ -51,6 +51,9 @@ public:
/// Constructor
TAO_Connection_Handler (TAO_ORB_Core *orb_core);
+ /// Destructor
+ virtual ~TAO_Connection_Handler (void);
+
/// Return the underlying transport object
TAO_Transport *transport (void);
@@ -60,15 +63,6 @@ public:
/// Is the state final?
int is_finalized (void);
- /// Increment and decrement the refcount. The object is deleted when
- /// the refcount reaches zero.
- long incr_refcount (void);
- long decr_refcount (void);
-
- /// Set the handler in <CODE>LF_EVENT_CONNECTION_CLOSE_WAIT </CODE>
- /// state
- void connection_close_wait (void);
-
/// Close the underlying connection.
/**
* Used by the ORB to actively close connections that are idle,
@@ -96,13 +90,6 @@ public:
protected:
- /// Destructor
- /**
- * Protected destructor to enforce proper memory management through
- * the reference counting mechanism.
- */
- virtual ~TAO_Connection_Handler (void);
-
/// Return our TAO_ORB_Core pointer
TAO_ORB_Core *orb_core (void);
@@ -125,11 +112,6 @@ protected:
* place.
*/
- /// Implement the handle_close() callback
- virtual int handle_close_eh (ACE_HANDLE h,
- unsigned long reactor_mask,
- ACE_Event_Handler * eh);
-
/// Implement the handle_output() callback
int handle_output_eh (ACE_HANDLE h, ACE_Event_Handler * eh);
@@ -140,8 +122,7 @@ protected:
/// also Event_Handlers.
int close_connection_eh (ACE_Event_Handler * eh);
- /// Release the OS resources related to this handler, used in
- /// handle_close_eh()
+ /// Release the OS resources related to this handler.
virtual int release_os_resources (void);
/// Pre-invocation hook for I/O operations (handle_input() &
@@ -170,12 +151,6 @@ private:
/// Cached tss resources of the ORB that activated this object.
TAO_ORB_Core_TSS_Resources *tss_resources_;
- /// Pretty obvious
- long reference_count_;
-
- /// Lock for the reference count
- ACE_Lock *refcount_lock_;
-
/// Internal state lock, needs to be separate from the reference
/// count / pending upcalls lock because they interleave.
ACE_Lock * lock_;
diff --git a/TAO/tao/Connection_Handler.inl b/TAO/tao/Connection_Handler.inl
index 7de61103ad9..ee12597c17a 100644
--- a/TAO/tao/Connection_Handler.inl
+++ b/TAO/tao/Connection_Handler.inl
@@ -20,21 +20,6 @@ TAO_Connection_Handler::transport (void)
return this->transport_;
}
-#if 0
-// NOTE: Not used
-ACE_INLINE int
-TAO_Connection_Handler::is_connect_complete (void) const
-{
- return this->successful () || this->error_detected ();
-}
-
-ACE_INLINE int
-TAO_Connection_Handler::is_connect_successful (void) const
-{
- return (this->error_detected () == 0);
-}
-#endif /*if 0*/
-
ACE_INLINE int
TAO_Connection_Handler::is_finalized (void)
{
diff --git a/TAO/tao/Connector_Impl.cpp b/TAO/tao/Connector_Impl.cpp
index a4bb4cee8c0..99026fa52eb 100644
--- a/TAO/tao/Connector_Impl.cpp
+++ b/TAO/tao/Connector_Impl.cpp
@@ -39,13 +39,6 @@ TAO_Connect_Creation_Strategy<SVC_HANDLER>::make_svc_handler (SVC_HANDLER *&sh)
this->arg_),
-1);
- // Add a reference count. Why is this needed? We need this to make
- // sure that the connector doesnt delete this handler when we are
- // waiting for non-blocking connects to complete.
-
- // REFCNT: matches decr_refcount() in XXX_Connector::make_connection()
- sh->incr_refcount ();
-
return 0;
}
diff --git a/TAO/tao/Default_Protocols_Hooks.cpp b/TAO/tao/Default_Protocols_Hooks.cpp
index c57d7328772..2f16d2ae2d4 100644
--- a/TAO/tao/Default_Protocols_Hooks.cpp
+++ b/TAO/tao/Default_Protocols_Hooks.cpp
@@ -31,7 +31,7 @@ int
TAO_Default_Protocols_Hooks::call_client_protocols_hook (int &,
int &,
int &,
- int &,
+ int &,
const char *)
{
return 0;
@@ -41,7 +41,7 @@ int
TAO_Default_Protocols_Hooks::call_server_protocols_hook (int &,
int &,
int &,
- int &,
+ int &,
const char *)
{
return 0;
@@ -128,23 +128,23 @@ TAO_Default_Protocols_Hooks::rt_service_context (TAO_Stub *,
{
}
-int
+int
TAO_Default_Protocols_Hooks::update_client_protocol_properties (TAO_Stub *,
- TAO_Connection_Handler *,
- const char *)
+ TAO_Connection_Handler *,
+ const char *)
{
return 0;
}
-
-int
+
+int
TAO_Default_Protocols_Hooks::update_server_protocol_properties (CORBA::Policy *,
- TAO_Connection_Handler *,
- const char *)
+ TAO_Connection_Handler *,
+ const char *)
{
return 0;
}
-CORBA::Long
+CORBA::Long
TAO_Default_Protocols_Hooks::get_dscp_codepoint (void)
{
return 0;
diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp
index 52c2150c3b4..29434a552a6 100644
--- a/TAO/tao/IIOP_Connection_Handler.cpp
+++ b/TAO/tao/IIOP_Connection_Handler.cpp
@@ -54,7 +54,6 @@ TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler (
// store this pointer (indirectly increment ref count)
this->transport (specific_transport);
- TAO_Transport::release (specific_transport);
}
TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler (TAO_ORB_Core *orb_core,
@@ -67,12 +66,11 @@ TAO_IIOP_Connection_Handler::TAO_IIOP_Connection_Handler (TAO_ORB_Core *orb_core
{
}
-
TAO_IIOP_Connection_Handler::~TAO_IIOP_Connection_Handler (void)
{
+ delete this->transport ();
}
-
int
TAO_IIOP_Connection_Handler::open_handler (void *v)
{
@@ -134,7 +132,6 @@ TAO_IIOP_Connection_Handler::open (void*)
return -1;
}
-
if (TAO_debug_level > 0)
{
ACE_TCHAR client[MAXHOSTNAMELEN + 16];
@@ -158,10 +155,6 @@ TAO_IIOP_Connection_Handler::open (void*)
return 0;
}
-
-
-
-
int
TAO_IIOP_Connection_Handler::resume_handler (void)
{
@@ -177,26 +170,63 @@ TAO_IIOP_Connection_Handler::close_connection (void)
int
TAO_IIOP_Connection_Handler::handle_input (ACE_HANDLE h)
{
- return this->handle_input_eh (h, this);
+ int result =
+ this->handle_input_eh (h, this);
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ return 0;
+ }
+
+ return result;
}
int
TAO_IIOP_Connection_Handler::handle_output (ACE_HANDLE handle)
{
- return this->handle_output_eh (handle, this);
+ int result =
+ this->handle_output_eh (handle, this);
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ return 0;
+ }
+
+ return result;
+}
+
+int
+TAO_IIOP_Connection_Handler::handle_timeout (const ACE_Time_Value &,
+ const void *)
+{
+ // We don't use this upcall from the Reactor. However, we should
+ // override this since the base class returns -1 which will result
+ // in handle_close() getting called.
+ return 0;
}
int
TAO_IIOP_Connection_Handler::handle_close (ACE_HANDLE handle,
ACE_Reactor_Mask rm)
{
- return this->handle_close_eh (handle, rm, this);
+ ACE_ASSERT (0);
+ return 0;
+}
+
+int
+TAO_IIOP_Connection_Handler::close (u_long)
+{
+ this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED);
+ this->transport ()->remove_reference ();
+ return 0;
}
int
TAO_IIOP_Connection_Handler::release_os_resources (void)
{
- return this->peer().close ();
+ return this->peer ().close ();
}
int
diff --git a/TAO/tao/IIOP_Connection_Handler.h b/TAO/tao/IIOP_Connection_Handler.h
index fe7d26c3881..57a562fd0ea 100644
--- a/TAO/tao/IIOP_Connection_Handler.h
+++ b/TAO/tao/IIOP_Connection_Handler.h
@@ -83,7 +83,7 @@ class TAO_Export TAO_IIOP_Connection_Handler : public TAO_IIOP_SVC_HANDLER,
public:
- TAO_IIOP_Connection_Handler (ACE_Thread_Manager* t = 0);
+ TAO_IIOP_Connection_Handler (ACE_Thread_Manager * = 0);
/// Constructor. <arg> parameter is used by the Acceptor to pass the
/// protocol configuration properties for this connection.
@@ -99,6 +99,10 @@ public:
/// connected. Argument is unused.
virtual int open (void *);
+ /// Close called by the Acceptor or Connector when connection
+ /// establishment fails.
+ int close (u_long = 0);
+
//@{
/** @name Event Handler overloads
*/
@@ -107,6 +111,8 @@ public:
virtual int handle_input (ACE_HANDLE);
virtual int handle_output (ACE_HANDLE);
virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
+ virtual int handle_timeout (const ACE_Time_Value &current_time,
+ const void *act = 0);
//@}
/// Add ourselves to Cache.
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index 082700ed805..af0a9817102 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -15,12 +15,10 @@
#include "ace/Strategies_T.h"
-
ACE_RCSID (TAO,
IIOP_Connector,
"$Id$")
-
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class TAO_Connect_Concurrency_Strategy<TAO_IIOP_Connection_Handler>;
template class TAO_Connect_Creation_Strategy<TAO_IIOP_Connection_Handler>;
@@ -40,7 +38,6 @@ template class ACE_NonBlocking_Connect_Handler<TAO_IIOP_Connection_Handler>;
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
TAO_IIOP_Connector::TAO_IIOP_Connector (CORBA::Boolean flag)
: TAO_Connector (IOP::TAG_INTERNET_IOP),
lite_flag_ (flag),
@@ -162,14 +159,28 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
TAO_IIOP_Connection_Handler *svc_handler = 0;
- // Active connect
- int result = this->base_connector_.connect (svc_handler,
- remote_address,
- synch_options);
-
-
+ // Connect.
+ int result =
+ this->base_connector_.connect (svc_handler,
+ remote_address,
+ synch_options);
+
+ // This call creates the service handler. There are three
+ // possibilities: (a) connection succeeds immediately - in this
+ // case, the #REFCOUNT# on the handler is one; (b) connection
+ // completion is pending - in this case, the #REFCOUNT# on the
+ // handler is also one; (c) connection fails immediately - in this
+ // case, the #REFCOUNT# on the handler is zero since close() gets
+ // called on the handler;
+
+ // No immediate result. Wait for completion.
if (result == -1 && errno == EWOULDBLOCK)
{
+ // We add to the #REFCOUNT# since we are going to wait on a
+ // variable in the handler to changes, signifying success or
+ // failure.
+ svc_handler->add_reference ();
+
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - IIOP_Connector::make_connection, "
@@ -177,6 +188,7 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
"handle [%d]\n",
svc_handler->get_handle ()));
+ // Wait for connection completion.
result =
this->active_connect_strategy_->wait (svc_handler,
max_wait_time);
@@ -189,23 +201,28 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
svc_handler->get_handle (), result));
}
- }
-
- int status =
- svc_handler->is_finalized ();
+ // Check if the handler has been closed.
+ int closed =
+ svc_handler->is_finalized ();
- // Reduce the refcount to the svc_handler that we have. The
- // increment to the handler is done in make_svc_handler (). Now
- // that we dont need the reference to it anymore we can decrement
- // the refcount whether the connection is successful ot not.
+ // Irrespective of success or failure, remove the #REFCOUNT#
+ // added for waiting.
+ svc_handler->remove_reference ();
- // REFCNT: Matches with TAO_Connect_Strategy<>::make_svc_handler()
- long refcount = svc_handler->decr_refcount ();
-
- ACE_ASSERT (refcount >= 0);
-
- ACE_UNUSED_ARG (refcount);
+ // In case of failure, check if the connection has been closed.
+ if (result == -1)
+ {
+ if (!closed)
+ {
+ // Handler has not been closed - close it now. This
+ // happens when there is a problem while waiting other
+ // than the connection failure.
+ svc_handler->close ();
+ }
+ }
+ }
+ // In case of errors.
if (result == -1)
{
// Give users a clue to the problem.
@@ -218,12 +235,11 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
"errno"));
}
- (void) this->active_connect_strategy_->post_failed_connect (svc_handler,
- status);
-
return -1;
}
+ // At this point, the connection has be successfully connected.
+ // #REFCOUNT# is one.
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - IIOP_Connector::make_connection, "
@@ -231,41 +247,62 @@ TAO_IIOP_Connector::make_connection (TAO_GIOP_Invocation *invocation,
iiop_endpoint->host (), iiop_endpoint->port (),
svc_handler->peer ().get_handle ()));
- TAO_Transport *base_transport =
- TAO_Transport::_duplicate (svc_handler->transport ());
+ TAO_Transport *transport =
+ svc_handler->transport ();
// Add the handler to Cache
int retval =
this->orb_core ()->lane_resources ().transport_cache ().cache_transport (desc,
- base_transport);
+ transport);
- if (retval != 0 && TAO_debug_level > 0)
+ // Failure in adding to cache.
+ if (retval != 0)
{
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "could not add the new connection to cache\n"));
+ // Close the handler.
+ svc_handler->close ();
+
+ if (TAO_debug_level > 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - IIOP_Connector::make_connection, "
+ "could not add the new connection to cache\n"));
+ }
+
+ return -1;
}
// If the wait strategy wants us to be registered with the reactor
- // then we do so.
- retval = base_transport->wait_strategy ()->register_handler ();
+ // then we do so. If registeration is required and it succeeds,
+ // #REFCOUNT# becomes two.
+ retval = transport->wait_strategy ()->register_handler ();
- if (retval != 0 && TAO_debug_level > 0)
+ // Registration failures.
+ if (retval != 0)
{
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Connector::make_connection, "
- "could not register the new connection in the reactor\n"));
+ // Purge from the connection cache.
+ transport->purge_entry ();
+
+ // Close the handler.
+ svc_handler->close ();
+
+ if (TAO_debug_level > 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) - IIOP_Connector::make_connection, "
+ "could not register the new connection in the reactor\n"));
+ }
+
+ return -1;
}
// Handover the transport pointer to the Invocation class.
- TAO_Transport *&transport = invocation->transport ();
- transport = base_transport;
+ TAO_Transport *&invocation_transport =
+ invocation->transport ();
+ invocation_transport = transport;
return 0;
}
-
-
TAO_Profile *
TAO_IIOP_Connector::create_profile (TAO_InputCDR& cdr)
{
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 69a1f2acab9..0cdad6a4237 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -35,13 +35,6 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
, connection_handler_ (handler)
, messaging_object_ (0)
{
- if (connection_handler_ != 0)
- {
- // REFCNT: Matches one of
- // TAO_Transport::connection_handler_close() or
- // TAO_Transport::close_connection_shared.
- this->connection_handler_->incr_refcount();
- }
if (flag)
{
// Use the lite version of the protocol
@@ -58,7 +51,6 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
TAO_IIOP_Transport::~TAO_IIOP_Transport (void)
{
- ACE_ASSERT(this->connection_handler_ == 0);
delete this->messaging_object_;
}
@@ -81,9 +73,9 @@ TAO_IIOP_Transport::messaging_object (void)
}
ssize_t
-TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *max_wait_time)
+TAO_IIOP_Transport::send (iovec *iov, int iovcnt,
+ size_t &bytes_transferred,
+ const ACE_Time_Value *max_wait_time)
{
ssize_t retval = this->connection_handler_->peer ().sendv (iov, iovcnt,
max_wait_time);
@@ -94,9 +86,9 @@ TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt,
}
ssize_t
-TAO_IIOP_Transport::recv_i (char *buf,
- size_t len,
- const ACE_Time_Value *max_wait_time)
+TAO_IIOP_Transport::recv (char *buf,
+ size_t len,
+ const ACE_Time_Value *max_wait_time)
{
ssize_t n = this->connection_handler_->peer ().recv (buf,
len,
@@ -121,7 +113,6 @@ TAO_IIOP_Transport::recv_i (char *buf,
if (errno == EWOULDBLOCK)
return 0;
-
return -1;
}
@@ -138,32 +129,6 @@ TAO_IIOP_Transport::recv_i (char *buf,
}
int
-TAO_IIOP_Transport::register_handler_i (void)
-{
- if (TAO_debug_level > 4)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Transport[%d]::register_handler\n",
- this->id ()));
- }
-
- ACE_Reactor *r = this->orb_core_->reactor ();
-
- if (r == this->connection_handler_->reactor ())
- return 0;
-
- // Set the flag in the Connection Handler and in the Wait Strategy
- // @@Maybe we should set these flags after registering with the
- // reactor. What if the registration fails???
- this->ws_->is_registered (1);
-
- // Register the handler with the reactor
- return r->register_handler (this->connection_handler_,
- ACE_Event_Handler::READ_MASK);
-}
-
-
-int
TAO_IIOP_Transport::send_request (TAO_Stub *stub,
TAO_ORB_Core *orb_core,
TAO_OutputCDR &stream,
@@ -179,12 +144,6 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub,
if (tph != 0)
{
- ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
-
- if (this->check_event_handler_i ("IIOP_Transport::send_request")
- == -1)
- return -1;
-
const char protocol[] = "iiop";
const char * protocol_type = protocol;
@@ -270,9 +229,6 @@ TAO_IIOP_Transport::send_message_shared (
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
- if (this->check_event_handler_i ("IIOP_Transport::send_message_shared") == -1)
- return -1;
-
if (TAO_debug_level > 6)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - ")
@@ -280,8 +236,7 @@ TAO_IIOP_Transport::send_message_shared (
ACE_TEXT ("enable_network_priority = %d\n"),
this->connection_handler_->enable_network_priority ()));
- if (this->connection_handler_ != 0)
- this->connection_handler_->set_dscp_codepoint ();
+ this->connection_handler_->set_dscp_codepoint ();
r = this->send_message_shared_i (stub, message_semantics,
message_block, max_wait_time);
@@ -318,7 +273,6 @@ TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails,
// setup
opdetails.modify_request_id (this->bidirectional_flag ());
-
return TAO_Transport::generate_request_header (opdetails,
spec,
msg);
@@ -350,17 +304,6 @@ TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
// 1 (i.e., non-originating side)
this->bidirectional_flag (1);
- // Just make sure that the connection handler is sane before we go
- // head and do anything with it.
- ACE_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->handler_lock_,
- -1);
-
- if (this->check_event_handler_i ("IIOP_Transport::tear_listen_point_list")
- == -1)
- return -1;
-
return this->connection_handler_->process_listen_point_list (listen_list);
}
@@ -430,28 +373,16 @@ TAO_IIOP_Transport::get_listen_point (
// Get the local address of the connection
ACE_INET_Addr local_addr;
- {
- // Just make sure that the connection handler is sane before we go
- // head and do anything with it.
- ACE_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->handler_lock_,
- -1);
-
- if (this->check_event_handler_i ("IIOP_Transport::get_listen_point")
- == -1)
- return -1;
- if (this->connection_handler_->peer ().get_local_addr (local_addr)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Could not resolve local ")
- ACE_TEXT ("host address in ")
- ACE_TEXT ("get_listen_point()\n")),
- -1);
- }
- }
+ if (this->connection_handler_->peer ().get_local_addr (local_addr)
+ == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Could not resolve local ")
+ ACE_TEXT ("host address in ")
+ ACE_TEXT ("get_listen_point()\n")),
+ -1);
+ }
// Note: Looks like there is no point in sending the list of
// endpoints on interfaces on which this connection has not
@@ -492,11 +423,3 @@ TAO_IIOP_Transport::get_listen_point (
return 1;
}
-
-TAO_Connection_Handler *
-TAO_IIOP_Transport::invalidate_event_handler_i (void)
-{
- TAO_Connection_Handler * eh = this->connection_handler_;
- this->connection_handler_ = 0;
- return eh;
-}
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 91a8ad18ff0..65442355d37 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -70,25 +70,22 @@ protected:
//@{
virtual ACE_Event_Handler * event_handler_i (void);
- virtual TAO_Connection_Handler * invalidate_event_handler_i (void);
/// Access the underlying messaging object
virtual TAO_Pluggable_Messaging *messaging_object (void);
- virtual ssize_t send_i (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *timeout = 0);
+ virtual ssize_t send (iovec *iov, int iovcnt,
+ size_t &bytes_transferred,
+ const ACE_Time_Value *timeout = 0);
- virtual ssize_t recv_i (char *buf,
- size_t len,
- const ACE_Time_Value *s = 0);
-
- virtual int register_handler_i (void);
+ virtual ssize_t recv (char *buf,
+ size_t len,
+ const ACE_Time_Value *s = 0);
virtual int send_message_shared (TAO_Stub *stub,
- int message_semantics,
- const ACE_Message_Block *message_block,
- ACE_Time_Value *max_wait_time);
+ int message_semantics,
+ const ACE_Message_Block *message_block,
+ ACE_Time_Value *max_wait_time);
public:
@@ -106,7 +103,7 @@ public:
ACE_Time_Value *max_time_wait = 0);
/*virtual int send_reply (TAO_OutputCDR &stream,
- TAO_Adapter *poa = 0);*/
+ TAO_Adapter *poa = 0);*/
virtual int generate_request_header (TAO_Operation_Details &opdetails,
TAO_Target_Specification &spec,
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index b67d2abaf13..3cffad1b899 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -147,7 +147,8 @@ TAO_GIOP_Invocation::~TAO_GIOP_Invocation (void)
/// Ossama remove this when you are done..
if (this->profile_)
this->profile_->_decr_refcnt ();
- TAO_Transport::release (this->transport_);
+ if (this->transport_)
+ this->transport_->remove_reference ();
}
// The public API involves creating an invocation, starting it, filling
@@ -236,13 +237,10 @@ TAO_GIOP_Invocation::perform_call (TAO_Transport_Descriptor_Interface &desc
if (this->transport_ != 0)
{
this->transport_->make_idle ();
+ this->transport_->remove_reference ();
+ this->transport_ = 0;
}
- // Release the transport prior to connecting.
- // In most cases the transport_ will already be zero.
- TAO_Transport::release (this->transport_);
- this->transport_ = 0;
-
// Get a pointer to the connector registry, which might be in
// thread-specific storage, depending on the concurrency model.
TAO_Connector_Registry *conn_reg =
@@ -496,8 +494,7 @@ TAO_GIOP_Invocation::close_connection (void)
// false error reports to applications.
this->transport_->close_connection ();
- // this->transport_->idle ();
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
this->transport_ = 0;
this->endpoint_->reset_hint ();
diff --git a/TAO/tao/LF_CH_Event.cpp b/TAO/tao/LF_CH_Event.cpp
index 700871bf95d..907e58821a2 100644
--- a/TAO/tao/LF_CH_Event.cpp
+++ b/TAO/tao/LF_CH_Event.cpp
@@ -48,23 +48,13 @@ TAO_LF_CH_Event::state_changed_i (int new_state)
}
else if (this->state_ == TAO_LF_Event::LFS_SUCCESS)
{
- if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSE_WAIT
- || new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED)
+ if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED)
{
this->prev_state_ = this->state_;
this->state_ = new_state;
}
return;
}
- else if (this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSE_WAIT)
- {
- if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED)
- {
- // Dont reset the previous state. We could have come only
- // from SUCESS. Let that state be preserved.
- this->state_ = new_state;
- }
- }
else if (this->state_ == TAO_LF_Event::LFS_TIMEOUT)
{
if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED)
@@ -91,8 +81,6 @@ TAO_LF_CH_Event::error_detected (void) const
{
if (this->prev_state_ == TAO_LF_Event::LFS_CONNECTION_WAIT)
return this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED;
- else if (this->prev_state_ == TAO_LF_Event::LFS_CONNECTION_CLOSE_WAIT)
- return (this->state_ != TAO_LF_Event::LFS_CONNECTION_CLOSED);
return 0;
}
diff --git a/TAO/tao/LF_CH_Event.h b/TAO/tao/LF_CH_Event.h
index 587874266b4..bbc54d64363 100644
--- a/TAO/tao/LF_CH_Event.h
+++ b/TAO/tao/LF_CH_Event.h
@@ -75,27 +75,21 @@ private:
*
* LFS_TIMEOUT - The event has timed out.
*
- * LFS_CONNECTION_CLOSE_WAIT - A temporary state before complete
- * connection closure. An event
- * handler in this state is supposed to
- * be getting ready for closure.
- *
* LFS_CONNECTION_CLOSED - The connection was closed since
* an error occured while trying to
* establish connection
*
* Event State Diagram
* -------------------
- * |----> CLOSED <-|
- * | ^ |
- * | | |
- * IDLE ---> CONNECTION_WAIT-| | CLOSE_WAIT
- * | | ^
- * | | |
- * |----> SUCESS--->
+ * |----> CLOSED
+ * | ^
+ * | |
+ * IDLE ---> CONNECTION_WAIT--| |
+ * | |
+ * | |
+ * |----> SUCESS
*
- * Timeouts can occur while waiting for connections or during
- * CLOSE_WAIT state.
+ * Timeouts can occur while waiting for connections.
*
*/
virtual void state_changed_i (int new_state);
diff --git a/TAO/tao/LF_Connect_Strategy.cpp b/TAO/tao/LF_Connect_Strategy.cpp
index b69fe08fc5d..9fe9b162e9c 100644
--- a/TAO/tao/LF_Connect_Strategy.cpp
+++ b/TAO/tao/LF_Connect_Strategy.cpp
@@ -71,8 +71,5 @@ TAO_LF_Connect_Strategy::wait (TAO_Connection_Handler *ch,
if (!ch->successful () && result != -1)
result = -1;
- // @@todo We need to use a auto_ptr<>-like object here!
- // TAO_Transport::release(transport);
-
return result;
}
diff --git a/TAO/tao/LF_Event.h b/TAO/tao/LF_Event.h
index c6d919a333a..6dd77f6e23b 100644
--- a/TAO/tao/LF_Event.h
+++ b/TAO/tao/LF_Event.h
@@ -89,9 +89,6 @@ public:
LFS_FAILURE,
/// The event has timed out
LFS_TIMEOUT,
- /// The event is waiting for connection closure. This is a
- /// temporary state
- LFS_CONNECTION_CLOSE_WAIT,
/// The connection was closed.
LFS_CONNECTION_CLOSED
};
diff --git a/TAO/tao/Makefile.bor b/TAO/tao/Makefile.bor
index 55003ad884f..30d4f9e4b74 100644
--- a/TAO/tao/Makefile.bor
+++ b/TAO/tao/Makefile.bor
@@ -60,7 +60,6 @@ OBJFILES = \
$(OBJDIR)\Default_Collocation_Resolver.obj \
$(OBJDIR)\Connection_Purging_Strategy.obj \
$(OBJDIR)\Connection_Handler.obj \
- $(OBJDIR)\Notify_Handler.obj \
$(OBJDIR)\Thread_Per_Connection_Handler.obj \
$(OBJDIR)\Connector_Impl.obj \
$(OBJDIR)\Connector_Registry.obj \
diff --git a/TAO/tao/Makefile.tao b/TAO/tao/Makefile.tao
index 2a0a35bfff1..3440276a5d7 100644
--- a/TAO/tao/Makefile.tao
+++ b/TAO/tao/Makefile.tao
@@ -92,7 +92,6 @@ PLUGGABLE_PROTOCOLS_FILES = \
Transport_Connector \
Transport \
Incoming_Message_Queue \
- Notify_Handler \
Resume_Handle \
Profile \
Endpoint \
@@ -1316,7 +1315,7 @@ realclean:
Queued_Message.inl Asynch_Queued_Message.h Flushing_Strategy.h \
Thread_Lane_Resources.h \
Thread_Lane_Resources.i \
- debug.h Resume_Handle.h Resume_Handle.inl Notify_Handler.h \
+ debug.h Resume_Handle.h Resume_Handle.inl \
Codeset_Manager.h \
CONV_FRAMEC.h \
Codeset_Translator_Factory.h \
@@ -1593,292 +1592,6 @@ realclean:
$(ACE_ROOT)/ace/Thread_Manager.i \
ORB_Core.i debug.h
-.obj/Notify_Handler.o .obj/Notify_Handler.so .shobj/Notify_Handler.o .shobj/Notify_Handler.so: Notify_Handler.cpp Notify_Handler.h \
- $(ACE_ROOT)/ace/pre.h \
- TAO_Export.h \
- $(ACE_ROOT)/ace/post.h \
- $(ACE_ROOT)/ace/ace_wchar.h \
- $(ACE_ROOT)/ace/ace_wchar.inl \
- $(ACE_ROOT)/ace/Event_Handler.h \
- $(ACE_ROOT)/ace/ACE_export.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/OS_Dirent.h \
- $(ACE_ROOT)/ace/OS_Export.h \
- $(ACE_ROOT)/ace/OS_Errno.h \
- $(ACE_ROOT)/ace/OS_Errno.inl \
- $(ACE_ROOT)/ace/OS_Dirent.inl \
- $(ACE_ROOT)/ace/OS_String.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/OS_String.inl \
- $(ACE_ROOT)/ace/OS_Memory.h \
- $(ACE_ROOT)/ace/OS_Memory.inl \
- $(ACE_ROOT)/ace/OS_TLI.h \
- $(ACE_ROOT)/ace/OS_TLI.inl \
- $(ACE_ROOT)/ace/Time_Value.h \
- $(ACE_ROOT)/ace/Time_Value.inl \
- $(ACE_ROOT)/ace/Default_Constants.h \
- $(ACE_ROOT)/ace/Global_Macros.h \
- $(ACE_ROOT)/ace/Min_Max.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Event_Handler.i \
- Connection_Handler.h LF_CH_Event.h LF_Event.h LF_Event.inl \
- LF_Invocation_Event.inl \
- Connection_Handler.inl \
- Transport.h corbafwd.h \
- $(ACE_ROOT)/ace/CDR_Base.h \
- $(ACE_ROOT)/ace/CDR_Base.inl \
- orbconf.h \
- TAO_Export.h \
- corbafwd.i \
- Exception.h \
- corbafwd.h \
- $(ACE_ROOT)/ace/CORBA_macros.h \
- $(ACE_ROOT)/ace/Exception_Macros.h \
- $(ACE_ROOT)/ace/SStringfwd.h \
- $(ACE_ROOT)/ace/iosfwd.h \
- Exception.i \
- Transport_Descriptor_Interface.h \
- Transport_Descriptor_Interface.inl \
- Transport_Cache_Manager.h \
- Cache_Entries.h \
- Transport_Descriptor_Interface.h \
- $(ACE_ROOT)/ace/Recyclable.h \
- $(ACE_ROOT)/ace/Recyclable.inl \
- Cache_Entries.inl \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.h \
- $(ACE_ROOT)/ace/Functor.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/Flag_Manip.h \
- $(ACE_ROOT)/ace/Flag_Manip.i \
- $(ACE_ROOT)/ace/Handle_Ops.h \
- $(ACE_ROOT)/ace/Handle_Ops.i \
- $(ACE_ROOT)/ace/Lib_Find.h \
- $(ACE_ROOT)/ace/Lib_Find.i \
- $(ACE_ROOT)/ace/Init_ACE.h \
- $(ACE_ROOT)/ace/Init_ACE.i \
- $(ACE_ROOT)/ace/Sock_Connect.h \
- $(ACE_ROOT)/ace/Sock_Connect.i \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Functor.i \
- $(ACE_ROOT)/ace/Functor_T.h \
- $(ACE_ROOT)/ace/Functor_T.i \
- $(ACE_ROOT)/ace/Functor_T.cpp \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.h \
- $(ACE_ROOT)/ace/OS_Log_Msg_Attributes.inl \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.i \
- $(ACE_ROOT)/ace/Synch.h \
- $(ACE_ROOT)/ace/Synch.i \
- $(ACE_ROOT)/ace/Synch_T.h \
- $(ACE_ROOT)/ace/Synch_T.i \
- $(ACE_ROOT)/ace/Thread.h \
- $(ACE_ROOT)/ace/Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.h \
- $(ACE_ROOT)/ace/Base_Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread_Adapter.inl \
- $(ACE_ROOT)/ace/Thread.i \
- $(ACE_ROOT)/ace/Synch_T.cpp \
- $(ACE_ROOT)/ace/Hash_Map_Manager_T.cpp \
- $(ACE_ROOT)/ace/Service_Config.h \
- $(ACE_ROOT)/ace/Unbounded_Queue.h \
- $(ACE_ROOT)/ace/Node.h \
- $(ACE_ROOT)/ace/Node.cpp \
- $(ACE_ROOT)/ace/Unbounded_Queue.inl \
- $(ACE_ROOT)/ace/Unbounded_Queue.cpp \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/Unbounded_Set.h \
- $(ACE_ROOT)/ace/Unbounded_Set.inl \
- $(ACE_ROOT)/ace/Unbounded_Set.cpp \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/String_Base.h \
- $(ACE_ROOT)/ace/String_Base_Const.h \
- $(ACE_ROOT)/ace/String_Base.i \
- $(ACE_ROOT)/ace/String_Base.cpp \
- $(ACE_ROOT)/ace/Malloc.h \
- $(ACE_ROOT)/ace/Malloc.i \
- $(ACE_ROOT)/ace/Malloc_T.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.h \
- $(ACE_ROOT)/ace/Malloc_Allocator.i \
- $(ACE_ROOT)/ace/Free_List.h \
- $(ACE_ROOT)/ace/Free_List.i \
- $(ACE_ROOT)/ace/Free_List.cpp \
- $(ACE_ROOT)/ace/Malloc_T.i \
- $(ACE_ROOT)/ace/Malloc_T.cpp \
- $(ACE_ROOT)/ace/Memory_Pool.h \
- $(ACE_ROOT)/ace/Signal.h \
- $(ACE_ROOT)/ace/Signal.i \
- $(ACE_ROOT)/ace/Mem_Map.h \
- $(ACE_ROOT)/ace/Mem_Map.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \
- $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \
- $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \
- $(ACE_ROOT)/ace/Memory_Pool.i \
- $(ACE_ROOT)/ace/Auto_Ptr.h \
- $(ACE_ROOT)/ace/Auto_Ptr.i \
- $(ACE_ROOT)/ace/Auto_Ptr.cpp \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/XML_Svc_Conf.h \
- $(ACE_ROOT)/ace/Service_Config.i \
- $(ACE_ROOT)/ace/Reactor.h \
- $(ACE_ROOT)/ace/Handle_Set.h \
- $(ACE_ROOT)/ace/Handle_Set.i \
- $(ACE_ROOT)/ace/Timer_Queue.h \
- $(ACE_ROOT)/ace/Timer_Queue_T.h \
- $(ACE_ROOT)/ace/Test_and_Set.h \
- $(ACE_ROOT)/ace/Test_and_Set.i \
- $(ACE_ROOT)/ace/Test_and_Set.cpp \
- $(ACE_ROOT)/ace/Timer_Queue_T.i \
- $(ACE_ROOT)/ace/Timer_Queue_T.cpp \
- $(ACE_ROOT)/ace/Reactor.i \
- $(ACE_ROOT)/ace/Reactor_Impl.h \
- $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \
- Transport_Cache_Manager.inl \
- Transport_Timer.h Incoming_Message_Queue.h Pluggable_Messaging_Utils.h \
- IOP_IORC.h \
- OctetSeqC.h \
- Sequence.h \
- Managed_Types.h \
- Managed_Types.i \
- $(ACE_ROOT)/ace/Message_Block.h \
- $(ACE_ROOT)/ace/Message_Block.i \
- $(ACE_ROOT)/ace/Message_Block_T.h \
- $(ACE_ROOT)/ace/Message_Block_T.i \
- $(ACE_ROOT)/ace/Message_Block_T.cpp \
- Sequence.i \
- Sequence_T.h \
- Sequence_T.i \
- Sequence_T.cpp \
- Typecode.h \
- Exception.h \
- Pseudo_VarOut_T.h \
- Pseudo_VarOut_T.inl \
- Pseudo_VarOut_T.cpp \
- Typecode.i \
- Environment.h \
- Environment.i \
- Seq_Var_T.h \
- Seq_Var_T.inl \
- Seq_Var_T.cpp \
- Seq_Out_T.h \
- Seq_Out_T.inl \
- Seq_Out_T.cpp \
- OctetSeqC.i \
- VarOut_T.h \
- VarOut_T.inl \
- VarOut_T.cpp \
- CDR.h \
- $(ACE_ROOT)/ace/CDR_Stream.h \
- $(ACE_ROOT)/ace/CDR_Stream.i \
- CDR.i \
- IOP_IORC.i \
- Pluggable_Messaging_Utils.i \
- Incoming_Message_Queue.inl Synch_Refcountable.h \
- $(ACE_ROOT)/ace/Refcountable.h \
- $(ACE_ROOT)/ace/Refcountable.inl \
- Synch_Refcountable.inl Transport.inl ORB_Core.h ORB.h ServicesC.h \
- ServicesC.i CORBA_String.h \
- CORBA_String.inl \
- ObjectIdListC.h ObjectIdListC.i objectid.h PolicyC.h CurrentC.h \
- Object.h \
- Policy_ForwardC.h \
- Objref_VarOut_T.h \
- varbase.h \
- Objref_VarOut_T.inl \
- Objref_VarOut_T.cpp \
- Policy_ForwardC.i \
- Object_KeyC.h \
- Object_KeyC.i \
- Object.i \
- Any_Impl_T.h \
- Any.h \
- Any.i \
- Any_Impl_T.inl \
- Any_Impl_T.cpp \
- Marshal.h \
- Marshal.i \
- debug.h \
- CurrentC.i Policy_ForwardC.h Remote_Object_Proxy_Impl.h \
- Object_Proxy_Impl.h \
- PolicyC.i \
- ORB.i \
- Environment.h Policy_Manager.h \
- Policy_Set.h \
- PolicyC.h \
- Policy_Set.i \
- LocalObject.h \
- LocalObject.i \
- Policy_Manager.i \
- Resource_Factory.h \
- $(ACE_ROOT)/ace/Service_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.h \
- $(ACE_ROOT)/ace/Shared_Object.i \
- $(ACE_ROOT)/ace/DLL.h \
- $(ACE_ROOT)/ace/Service_Object.i \
- CONV_FRAMEC.h CONV_FRAMEC.i params.h \
- params.i \
- TAO_Singleton_Manager.h \
- TAO_Singleton_Manager.inl \
- TAO_Singleton.h \
- TAO_Singleton.inl \
- TAO_Singleton.cpp \
- TAO_Singleton.h \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Object_Manager.i \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- TAO_Singleton_Manager.h \
- Adapter.h Adapter.i PolicyFactory_Registry.h PortableInterceptorC.h \
- PI_ForwardC.h OctetSeqC.h StringSeqC.h Sequence.h StringSeqC.i \
- PI_ForwardC.i DynamicC.h \
- Any_Dual_Impl_T.h \
- Any_Dual_Impl_T.inl \
- Any_Dual_Impl_T.cpp \
- DynamicC.i Messaging_SyncScopeC.h Messaging_SyncScopeC.i IOPC.h \
- IOP_CodecC.h \
- IOP_CodecC.i \
- IOPC.i PortableInterceptorC.i \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- Parser_Registry.h \
- Parser_Registry.i \
- Service_Callbacks.h \
- IOPC.h \
- Service_Callbacks.i \
- Fault_Tolerance_Service.h \
- Fault_Tolerance_Service.i \
- Cleanup_Func_Registry.h \
- $(ACE_ROOT)/ace/Array_Base.h \
- $(ACE_ROOT)/ace/Array_Base.inl \
- $(ACE_ROOT)/ace/Array_Base.cpp \
- Cleanup_Func_Registry.inl Object_Ref_Table.h Interceptor_List.h \
- Interceptor_List.inl PICurrent.h LocalObject.h PICurrent.inl \
- $(ACE_ROOT)/ace/Thread_Manager.h \
- $(ACE_ROOT)/ace/Thread_Exit.h \
- $(ACE_ROOT)/ace/Thread_Control.h \
- $(ACE_ROOT)/ace/Thread_Control.inl \
- $(ACE_ROOT)/ace/Containers.h \
- $(ACE_ROOT)/ace/Containers.i \
- $(ACE_ROOT)/ace/Containers_T.h \
- $(ACE_ROOT)/ace/Containers_T.i \
- $(ACE_ROOT)/ace/Containers_T.cpp \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Framework_Component.h \
- $(ACE_ROOT)/ace/Framework_Component.inl \
- $(ACE_ROOT)/ace/Framework_Component_T.h \
- $(ACE_ROOT)/ace/Framework_Component_T.inl \
- $(ACE_ROOT)/ace/Framework_Component_T.cpp \
- $(ACE_ROOT)/ace/Thread_Manager.i \
- ORB_Core.i Resume_Handle.h Resume_Handle.inl
-
.obj/Resume_Handle.o .obj/Resume_Handle.so .shobj/Resume_Handle.o .shobj/Resume_Handle.so: Resume_Handle.cpp Resume_Handle.h \
$(ACE_ROOT)/ace/pre.h \
TAO_Export.h \
diff --git a/TAO/tao/Notify_Handler.cpp b/TAO/tao/Notify_Handler.cpp
index 22011d19569..e9a9c04607c 100644
--- a/TAO/tao/Notify_Handler.cpp
+++ b/TAO/tao/Notify_Handler.cpp
@@ -13,29 +13,29 @@ TAO_Notify_Handler::TAO_Notify_Handler (TAO_Transport *t,
ACE_HANDLE h,
ACE_Allocator *alloc)
: ACE_Event_Handler (t->orb_core ()->reactor ()),
- // REFCNT: Matches with Notify_Handler::~Notify_Handler()
- t_ (TAO_Transport::_duplicate (t)),
+ t_ (t),
h_ (h),
allocator_ (alloc)
{
+ this->t_->add_reference ();
}
TAO_Notify_Handler::TAO_Notify_Handler (TAO_Connection_Handler *ch,
ACE_Allocator *alloc)
: ACE_Event_Handler (ch->transport ()->orb_core ()->reactor ()),
- // REFCNT: Matches with Notify_Handler::~Notify_Handler()
t_ (ch->transport ()),
h_ (ACE_INVALID_HANDLE),
allocator_ (alloc)
{
+ this->t_->add_reference ();
// This constructor should *never* get called, it is just here to
// for backward comptibility.
- ACE_ASSERT (ch == 0);
+ ACE_ASSERT (0);
}
TAO_Notify_Handler::~TAO_Notify_Handler (void)
{
- TAO_Transport::release (this->t_);
+ this->t_->remove_reference ();;
}
@@ -99,7 +99,7 @@ TAO_Notify_Handler::handle_input (ACE_HANDLE)
this->h_);
// Does return value matter? Not is my opinion.
- (void) this->t_->handle_input_i (resume_handle);
+ (void) this->t_->handle_input (resume_handle);
// Yes, we are wantedly returning this so that handle_close () would
// be called
diff --git a/TAO/tao/PortableServer/AMH_Response_Handler.cpp b/TAO/tao/PortableServer/AMH_Response_Handler.cpp
index fbf1707511c..143241ec685 100644
--- a/TAO/tao/PortableServer/AMH_Response_Handler.cpp
+++ b/TAO/tao/PortableServer/AMH_Response_Handler.cpp
@@ -16,12 +16,13 @@ TAO_AMH_Response_Handler (TAO_ServerRequest &server_request)
: mesg_base_ (server_request.mesg_base_)
, request_id_ (server_request.request_id_)
, response_expected_ (server_request.response_expected_)
- , transport_ (TAO_Transport::_duplicate (server_request.transport ()))
+ , transport_ (server_request.transport ())
, orb_core_ (server_request.orb_core ())
, argument_flag_ (1)
, exception_type_ (TAO_GIOP_NO_EXCEPTION)
, reply_status_ (TAO_RS_UNINITIALIZED)
{
+ this->transport_->add_reference ();
}
TAO_AMH_Response_Handler::~TAO_AMH_Response_Handler (void)
@@ -34,10 +35,10 @@ TAO_AMH_Response_Handler::~TAO_AMH_Response_Handler (void)
if (this->response_expected_ == 0) //oneway ?
{
// if client is not expecting anything, don't send anything
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
return;
}
-
+
// If the ResponseHandler is being destroyed before a reply has
// been sent to the client, we send a system exception
// CORBA::NO_RESPONSE, with minor code to indicate the problem.
@@ -55,17 +56,17 @@ TAO_AMH_Response_Handler::~TAO_AMH_Response_Handler (void)
this->_tao_rh_send_exception (ex ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
}
ACE_CATCHALL
{
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
}
ACE_ENDTRY;
}
else
{
- TAO_Transport::release (this->transport_);
+ this->transport_->remove_reference ();
}
}
}
@@ -140,7 +141,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_reply (ACE_ENV_SINGLE_ARG_DECL)
}
// Send the message.
- int result = this->transport_->send_message (this->_tao_out,
+ int result = this->transport_->send_message (this->_tao_out,
0,
TAO_Transport::TAO_REPLY);
@@ -180,7 +181,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (CORBA::Exception &ex
}
this->reply_status_ = TAO_RS_SENDING;
}
-
+
TAO_Pluggable_Reply_Params_Base reply_params;
reply_params.request_id_ = this->request_id_;
reply_params.svc_ctx_.length (0);
@@ -192,14 +193,14 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (CORBA::Exception &ex
// ExceptionHolder information.
if (CORBA::SystemException::_downcast (&ex))
reply_params.reply_status_ = TAO_GIOP_SYSTEM_EXCEPTION;
-
+
if (this->mesg_base_->generate_exception_reply (this->_tao_out,
reply_params,
ex) == -1)
{
ACE_THROW (CORBA::INTERNAL ());
}
-
+
// Send the Exception
if (this->transport_->send_message (this->_tao_out,
0,
@@ -209,7 +210,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (CORBA::Exception &ex
ACE_TEXT ("TAO: (%P|%t|%N|%l): ")
ACE_TEXT ("TAO_AMH_Response_Handler: could not send exception reply\n")));
}
-
+
{
ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mutex_);
this->reply_status_ = TAO_RS_SENT;
diff --git a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
index b0478b816a3..f12619d9a84 100644
--- a/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
+++ b/TAO/tao/RTCORBA/RT_Protocols_Hooks.cpp
@@ -42,7 +42,7 @@ TAO_RT_Protocols_Hooks::init_hooks (TAO_ORB_Core *orb_core
// Save a reference to the priority mapping manager.
CORBA::Object_var obj =
orb_core->object_ref_table ().resolve_initial_references (TAO_OBJID_PRIORITYMAPPINGMANAGER
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
this->mapping_manager_ =
@@ -58,18 +58,18 @@ TAO_RT_Protocols_Hooks::init_hooks (TAO_ORB_Core *orb_core
this->network_mapping_manager_ =
TAO_Network_Priority_Mapping_Manager::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
object =
this->orb_core_->object_ref_table ().resolve_initial_references (
- "RTCurrent"
- ACE_ENV_ARG_PARAMETER);
+ "RTCurrent"
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
this->current_ =
RTCORBA::Current::_narrow (object.in ()
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -78,7 +78,7 @@ int
TAO_RT_Protocols_Hooks::call_client_protocols_hook (int &send_buffer_size,
int &recv_buffer_size,
int &no_delay,
- int &enable_network_priority,
+ int &enable_network_priority,
const char *protocol_type)
{
if (TAO_RT_Protocols_Hooks::client_protocols_hook_ == 0)
@@ -88,7 +88,7 @@ TAO_RT_Protocols_Hooks::call_client_protocols_hook (int &send_buffer_size,
send_buffer_size,
recv_buffer_size,
no_delay,
- enable_network_priority,
+ enable_network_priority,
protocol_type);
return 0;
@@ -105,7 +105,7 @@ int
TAO_RT_Protocols_Hooks::call_server_protocols_hook (int &send_buffer_size,
int &recv_buffer_size,
int &no_delay,
- int &enable_network_priority,
+ int &enable_network_priority,
const char *protocol_type)
{
if (TAO_RT_Protocols_Hooks::server_protocols_hook_ == 0)
@@ -116,7 +116,7 @@ TAO_RT_Protocols_Hooks::call_server_protocols_hook (int &send_buffer_size,
send_buffer_size,
recv_buffer_size,
no_delay,
- enable_network_priority,
+ enable_network_priority,
protocol_type);
if (result_value != 0)
@@ -134,20 +134,20 @@ TAO_RT_Protocols_Hooks::set_server_protocols_hook (Server_Protocols_Hook hook)
int
TAO_RT_Protocols_Hooks::update_client_protocol_properties (TAO_Stub *stub,
- TAO_Connection_Handler *connection_handler,
- const char *protocol_type)
+ TAO_Connection_Handler *connection_handler,
+ const char *protocol_type)
{
if (TAO_debug_level)
ACE_DEBUG ((LM_DEBUG,
- "TAO_RT_Protocols_Hooks::get_effective_client_protocol_properties\n"));
+ "TAO_RT_Protocols_Hooks::get_effective_client_protocol_properties\n"));
ACE_TRY_NEW_ENV
{
RTCORBA::ProtocolProperties_var properties =
- RTCORBA::ProtocolProperties::_nil ();
+ RTCORBA::ProtocolProperties::_nil ();
TAO_RT_Stub *rt_stub = ACE_dynamic_cast (TAO_RT_Stub *,
- stub);
+ stub);
CORBA::Policy* policy = rt_stub->client_protocol ();
@@ -156,7 +156,7 @@ TAO_RT_Protocols_Hooks::update_client_protocol_properties (TAO_Stub *stub,
if (!CORBA::is_nil (policy))
{
- client_protocols_policy =
+ client_protocols_policy =
RTCORBA::ClientProtocolPolicy::_narrow (policy
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -176,49 +176,48 @@ TAO_RT_Protocols_Hooks::update_client_protocol_properties (TAO_Stub *stub,
if (protocols[j].protocol_type == IOP::TAG_INTERNET_IOP)
{
properties =
- RTCORBA::ProtocolProperties::_narrow (
- protocols[j].transport_protocol_properties.in ()
- ACE_ENV_ARG_PARAMETER);
+ RTCORBA::ProtocolProperties::_narrow (protocols[j].transport_protocol_properties.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
break;
}
- }
- }
-
- if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
- {
- if (!CORBA::is_nil (properties.in ()))
- {
- RTCORBA::TCPProtocolProperties_var tcp_properties =
- RTCORBA::TCPProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int send_buffer_size =
- tcp_properties->send_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int recv_buffer_size =
- tcp_properties->recv_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int no_delay = tcp_properties->no_delay (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int enable_network_priority =
- tcp_properties->enable_network_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IIOP_Connection_Handler *iiop_handler =
- ACE_dynamic_cast (TAO_IIOP_Connection_Handler *,
- connection_handler);
-
- iiop_handler->update_protocol_properties (send_buffer_size,
- recv_buffer_size,
- no_delay,
- enable_network_priority);
- }
- }
- }
+ }
+ }
+
+ if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
+ {
+ if (!CORBA::is_nil (properties.in ()))
+ {
+ RTCORBA::TCPProtocolProperties_var tcp_properties =
+ RTCORBA::TCPProtocolProperties::_narrow (properties.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ int send_buffer_size =
+ tcp_properties->send_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int recv_buffer_size =
+ tcp_properties->recv_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int no_delay = tcp_properties->no_delay (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int enable_network_priority =
+ tcp_properties->enable_network_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ TAO_IIOP_Connection_Handler *iiop_handler =
+ ACE_dynamic_cast (TAO_IIOP_Connection_Handler *,
+ connection_handler);
+
+ iiop_handler->update_protocol_properties (send_buffer_size,
+ recv_buffer_size,
+ no_delay,
+ enable_network_priority);
+ }
+ }
+ }
}
ACE_CATCHANY
{
@@ -235,25 +234,25 @@ TAO_RT_Protocols_Hooks::update_client_protocol_properties (TAO_Stub *stub,
int
TAO_RT_Protocols_Hooks::update_server_protocol_properties (CORBA::Policy *policy,
- TAO_Connection_Handler *connection_handler,
- const char *protocol_type)
+ TAO_Connection_Handler *connection_handler,
+ const char *protocol_type)
{
if (TAO_debug_level)
ACE_DEBUG ((LM_DEBUG,
- "TAO_RT_Protocols_Hooks::get_effective_server_protocol_properties\n"));
+ "TAO_RT_Protocols_Hooks::get_effective_server_protocol_properties\n"));
ACE_TRY_NEW_ENV
{
RTCORBA::ProtocolProperties_var properties =
- RTCORBA::ProtocolProperties::_nil ();
+ RTCORBA::ProtocolProperties::_nil ();
RTCORBA::ServerProtocolPolicy_var server_protocols_policy;
TAO_ServerProtocolPolicy *server_protocols = 0;
if (!CORBA::is_nil (policy))
{
- server_protocols_policy =
+ server_protocols_policy =
RTCORBA::ServerProtocolPolicy::_narrow (policy
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
@@ -281,41 +280,41 @@ TAO_RT_Protocols_Hooks::update_server_protocol_properties (CORBA::Policy *policy
if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
break;
}
- }
- }
-
- if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
- {
- if (!CORBA::is_nil (properties.in ()))
- {
- RTCORBA::TCPProtocolProperties_var tcp_properties =
- RTCORBA::TCPProtocolProperties::_narrow (properties.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- int send_buffer_size =
- tcp_properties->send_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int recv_buffer_size =
- tcp_properties->recv_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int no_delay = tcp_properties->no_delay (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
- int enable_network_priority =
- tcp_properties->enable_network_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_TRY_CHECK;
-
- TAO_IIOP_Connection_Handler *iiop_handler =
- ACE_dynamic_cast (TAO_IIOP_Connection_Handler *,
- connection_handler);
-
- iiop_handler->update_protocol_properties (send_buffer_size,
- recv_buffer_size,
- no_delay,
- enable_network_priority);
- }
- }
- }
+ }
+ }
+
+ if (ACE_OS::strcmp (protocol_type, "iiop") == 0)
+ {
+ if (!CORBA::is_nil (properties.in ()))
+ {
+ RTCORBA::TCPProtocolProperties_var tcp_properties =
+ RTCORBA::TCPProtocolProperties::_narrow (properties.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ int send_buffer_size =
+ tcp_properties->send_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int recv_buffer_size =
+ tcp_properties->recv_buffer_size (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int no_delay = tcp_properties->no_delay (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ int enable_network_priority =
+ tcp_properties->enable_network_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ TAO_IIOP_Connection_Handler *iiop_handler =
+ ACE_dynamic_cast (TAO_IIOP_Connection_Handler *,
+ connection_handler);
+
+ iiop_handler->update_protocol_properties (send_buffer_size,
+ recv_buffer_size,
+ no_delay,
+ enable_network_priority);
+ }
+ }
+ }
}
ACE_CATCHANY
{
@@ -335,7 +334,7 @@ TAO_RT_Protocols_Hooks::get_dscp_codepoint (void)
{
if (TAO_debug_level)
ACE_DEBUG ((LM_DEBUG,
- "TAO_RT_Protocols_Hooks::get_dscp_codepoint\n"));
+ "TAO_RT_Protocols_Hooks::get_dscp_codepoint\n"));
CORBA::Long codepoint = 0;
@@ -346,10 +345,10 @@ TAO_RT_Protocols_Hooks::get_dscp_codepoint (void)
// for each.
RTCORBA::NetworkPriorityMapping *pm =
- this->network_mapping_manager_->mapping ();
+ this->network_mapping_manager_->mapping ();
CORBA::Short priority =
- this->current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
+ this->current_->the_priority (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
if (pm->to_network (priority, codepoint) == 0)
@@ -597,7 +596,7 @@ TAO_RT_Protocols_Hooks::set_thread_native_priority (CORBA::Short native_priority
ACE_Thread::self (current);
if (ACE_Thread::setprio (current, native_priority) == -1) {
- ACE_ERROR_RETURN((LM_ERROR, ACE_LIB_TEXT("(%N,%l) Error setting thread priority to %d, errno %d %m\n"), native_priority, errno ), -1);
+ ACE_ERROR_RETURN((LM_ERROR, ACE_LIB_TEXT("(%N,%l) Error setting thread priority to %d, errno %d %m\n"), native_priority, errno ), -1);
}
return 0;
@@ -639,14 +638,14 @@ TAO_RT_Protocols_Hooks::set_default_policies (ACE_ENV_SINGLE_ARG_DECL)
// Set ServerProtocolPolicy.
TAO_ServerProtocolPolicy *server_protocol_policy = 0;
ACE_NEW_RETURN (server_protocol_policy,
- TAO_ServerProtocolPolicy (protocols),
+ TAO_ServerProtocolPolicy (protocols),
-1);
RTCORBA::ServerProtocolPolicy_var safe_server_protocol_policy =
server_protocol_policy;
this->orb_core_->get_default_policies ()->set_policy (server_protocol_policy
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Set ClientProtocolPolicy.
diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp
index 52dd5ec14a5..a0e855d3eda 100644
--- a/TAO/tao/TAO.dsp
+++ b/TAO/tao/TAO.dsp
@@ -636,10 +636,6 @@ SOURCE=.\Muxed_TMS.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_Handler.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\NVList.cpp
# End Source File
# Begin Source File
@@ -1528,10 +1524,6 @@ SOURCE=.\Muxed_TMS.h
# End Source File
# Begin Source File
-SOURCE=.\Notify_Handler.h
-# End Source File
-# Begin Source File
-
SOURCE=.\nvlist.h
# End Source File
# Begin Source File
diff --git a/TAO/tao/TAO_Static.dsp b/TAO/tao/TAO_Static.dsp
index 12b6cb8959d..dc06e78c619 100644
--- a/TAO/tao/TAO_Static.dsp
+++ b/TAO/tao/TAO_Static.dsp
@@ -555,10 +555,6 @@ SOURCE=.\Muxed_TMS.cpp
# End Source File
# Begin Source File
-SOURCE=.\Notify_Handler.cpp
-# End Source File
-# Begin Source File
-
SOURCE=.\NVList.cpp
# End Source File
# Begin Source File
@@ -1487,10 +1483,6 @@ SOURCE=.\Muxed_TMS.h
# End Source File
# Begin Source File
-SOURCE=.\Notify_Handler.h
-# End Source File
-# Begin Source File
-
SOURCE=.\nvlist.h
# End Source File
# Begin Source File
diff --git a/TAO/tao/Thread_Lane_Resources.cpp b/TAO/tao/Thread_Lane_Resources.cpp
index ff2b263fd1d..d0c9327755c 100644
--- a/TAO/tao/Thread_Lane_Resources.cpp
+++ b/TAO/tao/Thread_Lane_Resources.cpp
@@ -8,7 +8,9 @@ ACE_RCSID(tao, Thread_Lane_Resources, "$Id$")
#include "tao/Acceptor_Registry.h"
#include "tao/Transport_Cache_Manager.h"
#include "tao/Leader_Follower.h"
-#include "Connector_Registry.h"
+#include "tao/Connection_Handler.h"
+#include "tao/Transport.h"
+#include "tao/Connector_Registry.h"
#include "ace/Reactor.h"
@@ -260,37 +262,28 @@ TAO_Thread_Lane_Resources::finalize (void)
delete this->acceptor_registry_;
}
- // Set of file descriptors corresponding to open connections. This
- // handle set is used to explicitly deregister the connection event
- // handlers from the Reactor. This is particularly important for
- // dynamically loaded ORBs where an application level reactor, such
- // as the Singleton reactor, is used instead of an ORB created one.
- ACE_Handle_Set handle_set;
- TAO_EventHandlerSet unregistered;
-
- // Close the transport cache and return the handle set that needs
- // to be de-registered from the reactor.
- this->transport_cache_->close (handle_set, unregistered);
-
- // Shutdown all open connections that are registered with the ORB
- // Core. Note that the ACE_Event_Handler::DONT_CALL mask is NOT
- // used here since the reactor should invoke each handle's
- // corresponding ACE_Event_Handler::handle_close() method to ensure
- // that the connection is shutdown gracefully prior to destroying
- // the ORB Core.
- if (handle_set.num_set () > 0)
- (void) this->leader_follower ().reactor ()->remove_handler (handle_set,
- ACE_Event_Handler::ALL_EVENTS_MASK);
- if (!unregistered.is_empty ())
+ // Set of handlers still in the connection cache.
+ TAO_Connection_Handler_Set handlers;
+
+ // Close the transport cache and return the handlers that were still
+ // registered. The cache will decrease the #REFCOUNT# on the
+ // handler when it removes the handler from cache. However,
+ // #REFCOUNT# is increased when the handler is placed in the handler
+ // set.
+ this->transport_cache_->close (handlers);
+
+ // Go through the handler set, closing the connections and removing
+ // the references.
+ TAO_Connection_Handler **handler = 0;
+ for (TAO_Connection_Handler_Set::iterator iter (handlers);
+ iter.next (handler);
+ iter.advance ())
{
- ACE_Event_Handler** eh;
- for (TAO_EventHandlerSetIterator iter(unregistered);
- iter.next (eh);
- iter.advance())
- {
- (*eh)->handle_close (ACE_INVALID_HANDLE,
- ACE_Event_Handler::ALL_EVENTS_MASK);
- }
+ // Connection is closed. Potential removal from the Reactor.
+ (*handler)->close_connection ();
+
+ // #REFCOUNT# related to the handler set decreases.
+ (*handler)->transport ()->remove_reference ();
}
delete this->transport_cache_;
diff --git a/TAO/tao/Thread_Per_Connection_Handler.cpp b/TAO/tao/Thread_Per_Connection_Handler.cpp
index d69e6dcf0df..cc9d6edac94 100644
--- a/TAO/tao/Thread_Per_Connection_Handler.cpp
+++ b/TAO/tao/Thread_Per_Connection_Handler.cpp
@@ -13,14 +13,12 @@ TAO_Thread_Per_Connection_Handler::TAO_Thread_Per_Connection_Handler (
TAO_Connection_Handler *ch)
: ch_ (ch)
{
- // REFCNT: Matches decr_refcount() in the destructor.
- (void) this->ch_->incr_refcount ();
+ this->ch_->transport ()->add_reference ();
}
TAO_Thread_Per_Connection_Handler::~TAO_Thread_Per_Connection_Handler (void)
{
- // REFCNT: Matches incr_refcount() in the constructor.
- (void) this->ch_->decr_refcount ();
+ this->ch_->transport ()->remove_reference ();
}
int
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 541ddf256c1..09728ad7404 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -20,7 +20,6 @@
#include "Thread_Lane_Resources.h"
#include "debug.h"
#include "Resume_Handle.h"
-#include "Notify_Handler.h"
#include "ace/Message_Block.h"
#include "ace/Reactor.h"
@@ -92,16 +91,9 @@ dump_iov (iovec *iov, int iovcnt, size_t id,
ACE_Log_Msg::instance ()->release ();
}
-/*
- * Definitions for methods declared in the transport class
- *
- */
-
-// Constructor.
TAO_Transport::TAO_Transport (CORBA::ULong tag,
TAO_ORB_Core *orb_core)
- : TAO_Synch_Refcountable (orb_core->resource_factory ()->create_cached_connection_lock (), 1)
- , tag_ (tag)
+ : tag_ (tag)
, orb_core_ (orb_core)
, cache_map_entry_ (0)
, bidirectional_flag_ (-1)
@@ -131,8 +123,6 @@ TAO_Transport::TAO_Transport (CORBA::ULong tag,
TAO_Transport::~TAO_Transport (void)
{
- ACE_ASSERT(this->refcount() == 0);
-
delete this->ws_;
delete this->tms_;
@@ -141,122 +131,17 @@ TAO_Transport::~TAO_Transport (void)
// By the time the destructor is reached all the connection stuff
// *must* have been cleaned up
- ACE_ASSERT(this->head_ == 0);
- ACE_ASSERT(this->cache_map_entry_ == 0);
-}
-
-
-/*
- *
- * Public utility methods that are called by other classes.
- *
- */
-/*static*/ TAO_Transport*
-TAO_Transport::_duplicate (TAO_Transport* transport)
-{
- if (transport != 0)
- {
- transport->increment ();
- }
- return transport;
-}
-
-/*static*/ void
-TAO_Transport::release (TAO_Transport* transport)
-{
- if (transport != 0)
- {
- int count = transport->decrement ();
-
- if (count == 0)
- {
- delete transport;
- }
- else if (count < 0)
- {
- ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - Transport[%d]::release, "
- "reference count is less than zero: %d\n",
- transport->id (), count));
- ACE_OS::abort ();
- }
- }
+ ACE_ASSERT (this->head_ == 0);
+ ACE_ASSERT (this->cache_map_entry_ == 0);
}
-
void
-TAO_Transport::provide_handle (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered)
-{
- ACE_MT (ACE_GUARD (ACE_Lock,
- guard,
- *this->handler_lock_));
- ACE_Event_Handler *eh = this->event_handler_i ();
-
- if (eh != 0)
- {
- if (this->ws_->is_registered ())
- {
- reactor_registered.set_bit (eh->get_handle ());
- }
- else
- {
- unregistered.insert (eh);
- }
- }
-}
-
-
-int
-TAO_Transport::register_handler (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->handler_lock_,
- -1));
- if (this->check_event_handler_i ("Transport::register_handler") == -1)
- return -1;
-
- return this->register_handler_i ();
-}
-
-
-ssize_t
-TAO_Transport::send (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *timeout)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->handler_lock_,
- -1));
-
- if (this->check_event_handler_i ("Transport::send") == -1)
- return -1;
-
- // now call the template method
- return this->send_i (iov, iovcnt, bytes_transferred, timeout);
-}
-
-
-ssize_t
-TAO_Transport::recv (char *buffer,
- size_t len,
- const ACE_Time_Value *timeout)
+TAO_Transport::provide_handler (TAO_Connection_Handler_Set &handlers)
{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock,
- guard,
- *this->handler_lock_,
- -1));
-
- if (this->check_event_handler_i ("Transport::recv") == -1)
- return -1;
-
- // now call the template method
- return this->recv_i (buffer, len, timeout);
+ this->add_reference ();
+ handlers.insert (this->connection_handler_i ());
}
-
int
TAO_Transport::idle_after_send (void)
{
@@ -278,8 +163,32 @@ TAO_Transport::tear_listen_point_list (TAO_InputCDR &)
void
TAO_Transport::close_connection (void)
{
- TAO_Connection_Handler * eh = this->invalidate_event_handler ();
- this->close_connection_shared (1, eh);
+ this->connection_handler_i ()->close_connection ();
+}
+
+int
+TAO_Transport::register_handler (void)
+{
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Transport[%d]::register_handler\n",
+ this->id ()));
+ }
+
+ ACE_Reactor *r = this->orb_core_->reactor ();
+
+ if (r == this->event_handler_i ()->reactor ())
+ return 0;
+
+ // Set the flag in the Connection Handler and in the Wait Strategy
+ // @@Maybe we should set these flags after registering with the
+ // reactor. What if the registration fails???
+ this->ws_->is_registered (1);
+
+ // Register the handler with the reactor
+ return r->register_handler (this->event_handler_i (),
+ ACE_Event_Handler::READ_MASK);
}
int
@@ -304,7 +213,6 @@ TAO_Transport::generate_locate_request (
return 0;
}
-
int
TAO_Transport::generate_request_header (
TAO_Operation_Details &opdetails,
@@ -314,8 +222,8 @@ TAO_Transport::generate_request_header (
// codeset service context is only supposed to be sent in the first request
// on a particular connection.
if (this->first_request_)
- this->orb_core()->codeset_manager()->
- generate_service_context( opdetails, *this );
+ this->orb_core ()->codeset_manager ()->
+ generate_service_context (opdetails, *this);
if (this->messaging_object ()->generate_request_header (opdetails,
spec,
@@ -333,32 +241,6 @@ TAO_Transport::generate_request_header (
return 0;
}
-
-/*
- * NOTE: Some of these calls looks like ideal fodder for
- * inlining. But, please note that the calls made within the method
- * are not inlined. This would increase closure cost on the
- * compiler.
- */
-void
-TAO_Transport::connection_handler_closing (void)
-{
- // The connection has closed, we must invalidate the handler to
- // ensure that any attempt to use this transport results in an
- // error. Basically all the other methods in the Transport
- // cooperate via check_event_handler_i()
-
- TAO_Connection_Handler * eh = this->invalidate_event_handler ();
- this->send_connection_closed_notifications ();
-
- if (eh != 0)
- {
- // REFCNT: Matches incr_refcnt in XXX_Transport::XXX_Transport
- // REFCNT: Only one of this or close_connection_shared() run
- eh->decr_refcount();
- }
-}
-
// @@TODO: Ideally the following should be inline.
int
TAO_Transport::recache_transport (TAO_Transport_Descriptor_Interface *desc)
@@ -374,7 +256,7 @@ TAO_Transport::recache_transport (TAO_Transport_Descriptor_Interface *desc)
void
TAO_Transport::purge_entry (void)
{
- (void) this->transport_cache_manager ().purge_entry (this->cache_map_entry_);
+ this->transport_cache_manager ().purge_entry (this->cache_map_entry_);
}
int
@@ -389,7 +271,6 @@ TAO_Transport::update_transport (void)
return this->transport_cache_manager ().update_entry (this->cache_map_entry_);
}
-
/*
*
* Methods called and used in the output path of the ORB.
@@ -423,7 +304,6 @@ TAO_Transport::handle_output (void)
return retval;
}
-
int
TAO_Transport::send_message_block_chain (const ACE_Message_Block *mb,
size_t &bytes_transferred,
@@ -431,9 +311,6 @@ TAO_Transport::send_message_block_chain (const ACE_Message_Block *mb,
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
- if (this->check_event_handler_i ("Transport::send_message_block_chain") == -1)
- return -1;
-
return this->send_message_block_chain_i (mb,
bytes_transferred,
max_wait_time);
@@ -442,7 +319,7 @@ TAO_Transport::send_message_block_chain (const ACE_Message_Block *mb,
int
TAO_Transport::send_message_block_chain_i (const ACE_Message_Block *mb,
size_t &bytes_transferred,
- ACE_Time_Value *)
+ ACE_Time_Value *max_wait_time)
{
size_t total_length = mb->total_length ();
@@ -486,22 +363,22 @@ TAO_Transport::send_message_shared (TAO_Stub *stub,
const ACE_Message_Block *message_block,
ACE_Time_Value *max_wait_time)
{
- int r;
+ int result;
+
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
- if (this->check_event_handler_i ("Transport::send_message_shared") == -1)
- return -1;
-
- r = this->send_message_shared_i (stub, message_semantics,
- message_block, max_wait_time);
- }
- if (r == -1)
- {
- this->close_connection ();
+ result =
+ this->send_message_shared_i (stub, message_semantics,
+ message_block, max_wait_time);
}
- return r;
+ if (result == -1)
+ {
+ this->close_connection ();
+ }
+
+ return result;
}
int
@@ -682,74 +559,6 @@ TAO_Transport::send_synch_message_helper_i (TAO_Synch_Queued_Message &synch_mess
return 0;
}
-
-void
-TAO_Transport::close_connection_i (void)
-{
- TAO_Connection_Handler * eh = this->invalidate_event_handler_i ();
- this->close_connection_shared (1, eh);
-}
-
-void
-TAO_Transport::close_connection_no_purge (void)
-{
- TAO_Connection_Handler * eh = this->invalidate_event_handler ();
-
- this->close_connection_shared (0,
- eh);
-}
-
-void
-TAO_Transport::close_connection_shared (int purge,
- TAO_Connection_Handler * eh)
-{
- // Purge the entry
- if (purge)
- {
- this->transport_cache_manager ().purge_entry (this->cache_map_entry_);
- }
-
- if (eh == 0)
- {
- // The connection was already closed
- return;
- }
-
- // Set the event handler in the connection close wait state.
- (void) eh->connection_close_wait ();
-
- // NOTE: If the wait strategy is in blocking mode, then there is no
- // chance that it could be inside the reactor. We can safely skip
- // driving the LF. If <purge> is 0, then we are cleaned up by the
- // cache. So no point in driving the LF either.
- if (this->ws_->non_blocking () && purge)
- {
- // NOTE: This is a work around for BUG 1020. We drive the leader
- // follower for a predetermined amount of time. Ideally this
- // needs to be an ORB option. But this is just the first
- // cut. Doing that will be a todo..
-
- ACE_Time_Value tv (ACE_DEFAULT_TIMEOUT, 0);
- this->orb_core_->leader_follower ().wait_for_event (eh,
- this,
- &tv);
-
- }
-
- // We need to explicitly shut it down to avoid memory leaks.
- if (!eh->successful () ||
- !this->ws_->non_blocking ())
- {
- eh->close_connection ();
- }
-
- this->send_connection_closed_notifications ();
-
- // REFCNT: Matches incr_refcnt in XXX_Transport::XXX_Transport
- // REFCNT: Only one of this or connection_handler_closing() run
- eh->decr_refcount ();
-}
-
int
TAO_Transport::queue_is_empty_i (void)
{
@@ -761,12 +570,7 @@ int
TAO_Transport::schedule_output_i (void)
{
ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh == 0)
- return -1;
-
ACE_Reactor *reactor = eh->reactor ();
- if (reactor == 0)
- return -1;
if (TAO_debug_level > 3)
{
@@ -782,12 +586,7 @@ int
TAO_Transport::cancel_output_i (void)
{
ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh == 0)
- return -1;
-
ACE_Reactor *reactor = eh->reactor ();
- if (reactor == 0)
- return -1;
if (TAO_debug_level > 3)
{
@@ -853,14 +652,11 @@ TAO_Transport::drain_queue (void)
int
TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[])
{
- if (this->check_event_handler_i ("Transport::drain_queue_helper") == -1)
- return -1;
-
size_t byte_count = 0;
// ... send the message ...
ssize_t retval =
- this->send_i (iov, iovcnt, byte_count);
+ this->send (iov, iovcnt, byte_count);
if (TAO_debug_level == 5)
{
@@ -892,7 +688,7 @@ TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[])
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) - Transport[%d]::drain_queue_helper, "
"error during %p\n",
- this->id (), "send_i()"));
+ this->id (), "send()"));
}
if (errno == EWOULDBLOCK)
return 0;
@@ -977,14 +773,8 @@ TAO_Transport::drain_queue_i (void)
if (this->flush_timer_pending ())
{
ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh != 0)
- {
- ACE_Reactor *reactor = eh->reactor ();
- if (reactor != 0)
- {
- (void) reactor->cancel_timer (this->flush_timer_id_);
- }
- }
+ ACE_Reactor *reactor = eh->reactor ();
+ reactor->cancel_timer (this->flush_timer_id_);
this->reset_flush_timer ();
}
return 1;
@@ -1059,25 +849,19 @@ TAO_Transport::check_buffering_constraints_i (TAO_Stub *stub,
if (set_timer)
{
ACE_Event_Handler *eh = this->event_handler_i ();
- if (eh != 0)
- {
- ACE_Reactor *reactor = eh->reactor ();
- if (reactor != 0)
- {
- this->current_deadline_ = new_deadline;
- ACE_Time_Value delay =
- new_deadline - ACE_OS::gettimeofday ();
+ ACE_Reactor *reactor = eh->reactor ();
+ this->current_deadline_ = new_deadline;
+ ACE_Time_Value delay =
+ new_deadline - ACE_OS::gettimeofday ();
- if (this->flush_timer_pending ())
- {
- (void) reactor->cancel_timer (this->flush_timer_id_);
- }
- this->flush_timer_id_ =
- reactor->schedule_timer (&this->transport_timer_,
- &this->current_deadline_,
- delay);
- }
+ if (this->flush_timer_pending ())
+ {
+ reactor->cancel_timer (this->flush_timer_id_);
}
+ this->flush_timer_id_ =
+ reactor->schedule_timer (&this->transport_timer_,
+ &this->current_deadline_,
+ delay);
}
return constraints_reached;
@@ -1095,14 +879,6 @@ TAO_Transport::report_invalid_event_handler (const char *caller)
}
}
-TAO_Connection_Handler *
-TAO_Transport::invalidate_event_handler (void)
-{
- ACE_MT (ACE_GUARD_RETURN (ACE_Lock, guard, *this->handler_lock_, 0));
-
- return this->invalidate_event_handler_i ();
-}
-
void
TAO_Transport::send_connection_closed_notifications (void)
{
@@ -1148,7 +924,6 @@ TAO_Transport::send_message_shared_i (TAO_Stub *stub,
max_wait_time);
}
-
// Let's figure out if the message should be queued without trying
// to send first:
int try_sending_first = 1;
@@ -1283,8 +1058,6 @@ TAO_Transport::send_message_shared_i (TAO_Stub *stub,
return 0;
}
-
-
/*
*
* All the methods relevant to the incoming data path of the ORB are
@@ -1292,9 +1065,9 @@ TAO_Transport::send_message_shared_i (TAO_Stub *stub,
*
*/
int
-TAO_Transport::handle_input_i (TAO_Resume_Handle &rh,
- ACE_Time_Value * max_wait_time,
- int /*block*/)
+TAO_Transport::handle_input (TAO_Resume_Handle &rh,
+ ACE_Time_Value * max_wait_time,
+ int /*block*/)
{
if (TAO_debug_level > 3)
{
@@ -1315,9 +1088,8 @@ TAO_Transport::handle_input_i (TAO_Resume_Handle &rh,
"TAO (%P|%t) - Transport[%d]::handle_input_i, "
"error while parsing the head of the queue\n",
this->id()));
-
- this->send_connection_closed_notifications ();
}
+
return retval;
}
@@ -1372,14 +1144,7 @@ TAO_Transport::handle_input_i (TAO_Resume_Handle &rh,
// If there is an error return to the reactor..
if (n <= 0)
- {
- if (n == -1)
- {
- this->send_connection_closed_notifications ();
- }
-
- return n;
- }
+ return n;
if (TAO_debug_level > 2)
{
@@ -1488,7 +1253,6 @@ TAO_Transport::parse_incoming_messages (ACE_Message_Block &block)
"error in incoming message\n",
this->id ()));
- this->send_connection_closed_notifications ();
return -1;
}
}
@@ -1580,7 +1344,7 @@ TAO_Transport::consolidate_message (ACE_Message_Block &incoming,
"error while trying to consolidate\n",
this->id ()));
}
- this->send_connection_closed_notifications ();
+
return -1;
}
@@ -1932,8 +1696,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
"received CloseConnection message %p\n",
this->id(), ""));
- this->send_connection_closed_notifications ();
-
// Return a "-1" so that the next stage can take care of
// closing connection and the necessary memory management.
return -1;
@@ -1941,17 +1703,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
else if (t == TAO_PLUGGABLE_MESSAGE_REQUEST ||
t == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST)
{
- // Ready to process a request. Increment the refcount of <this
- // transport>. Theoretically, after handler resumption another
- // thread can access this very same transport and can even close
- // this. To have a valid Transport object for further processing
- // we should increment the refcount. Please see Bug 1382 for
- // more details.
- // REFCNT: Matched by the release before returning.
-
- // This generic class takes care of everything.
- TAO_Transport_Refcount_Guard rg (this);
-
// Let us resume the handle before we go ahead to process the
// request. This will open up the handle for other threads.
rh.resume_handle ();
@@ -1960,9 +1711,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
this,
qd) == -1)
{
- this->send_connection_closed_notifications ();
-
-
// Return a "-1" so that the next stage can take care of
// closing connection and the necessary memory management.
return -1;
@@ -1971,8 +1719,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
else if (t == TAO_PLUGGABLE_MESSAGE_REPLY ||
t == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY)
{
- // Please see ..else if (XXX_REQUEST) for whys and whats..
- TAO_Transport_Refcount_Guard rg (this);
rh.resume_handle ();
// @@todo: Maybe the input_cdr can be constructed from the
@@ -1989,7 +1735,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
"error in process_reply_message %p\n",
this->id (), ""));
- this->send_connection_closed_notifications ();
return -1;
}
@@ -2005,7 +1750,6 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd,
"dispatch reply failed\n",
this->id ()));
- this->send_connection_closed_notifications ();
return -1;
}
@@ -2156,25 +1900,10 @@ TAO_Transport::notify_reactor (void)
ACE_Event_Handler *eh =
this->event_handler_i ();
- if (eh == 0)
- return -1;
-
// Get the reactor associated with the event handler
ACE_Reactor *reactor =
this->orb_core ()->reactor ();
- if (reactor == 0)
- return -1;
-
- // NOTE: Instead of creating the handler seperately, it would be
- // awesome if we could create the handler when we create the
- // TAO_Queued_Data. That would save us an allocation.
- TAO_Notify_Handler *nh =
- TAO_Notify_Handler::create_handler (
- this,
- eh->get_handle (),
- this->orb_core ()->transport_message_buffer_allocator ());
-
if (TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
@@ -2185,7 +1914,7 @@ TAO_Transport::notify_reactor (void)
// Send a notification to the reactor...
- int retval = reactor->notify (nh,
+ int retval = reactor->notify (eh,
ACE_Event_Handler::READ_MASK);
if (retval < 0 && TAO_debug_level > 2)
@@ -2222,7 +1951,17 @@ TAO_Transport::assign_translators (TAO_InputCDR *inp, TAO_OutputCDR *outp)
}
}
+ACE_Event_Handler::Reference_Count
+TAO_Transport::add_reference (void)
+{
+ return this->event_handler_i ()->add_reference ();
+}
+ACE_Event_Handler::Reference_Count
+TAO_Transport::remove_reference (void)
+{
+ return this->event_handler_i ()->remove_reference ();
+}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index e78fa5ea664..d329759ac16 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -28,7 +28,6 @@
#include "Transport_Cache_Manager.h"
#include "Transport_Timer.h"
#include "Incoming_Message_Queue.h"
-#include "Synch_Refcountable.h"
class TAO_ORB_Core;
class TAO_Target_Specification;
@@ -209,7 +208,7 @@ class TAO_Stub;
* http://deuce.doc.wustl.edu/cvsweb/ace-latest.cgi/ACE_wrappers/TAO/docs/pluggable_protocols/index.html
*
*/
-class TAO_Export TAO_Transport : private TAO_Synch_Refcountable
+class TAO_Export TAO_Transport
{
public:
@@ -220,10 +219,6 @@ public:
/// destructor
virtual ~TAO_Transport (void);
- // Maintain reference counting with these
- static TAO_Transport* _duplicate (TAO_Transport* transport);
- static void release (TAO_Transport* transport);
-
/// Return the protocol tag.
/**
* The OMG assigns unique tags (a 32-bit unsigned number) to each
@@ -289,20 +284,14 @@ public:
*/
int queue_is_empty (void);
- /// Fill in a handle_set with any associated handler's reactor handle.
+ /// Added event handler to the handlers set.
/**
- * Called by the cache when the cache is closing in order to fill
- * in a handle_set in a thread-safe manner.
- *
- * @param reactor_registered the ACE_Handle_Set into which the
- * transport should place any handle registered with the reactor
+ * Called by the cache when the cache is closing.
*
- * @param unregistered the TAO_EventHandlerSet into which the
- * transport should place any event handler that is not registered
- * with anyone
+ * @param handlers the TAO_Connection_Handler_Set into which the
+ * transport should place its handler
*/
- void provide_handle (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered);
+ void provide_handler (TAO_Connection_Handler_Set &handlers);
/// Remove all messages from the outgoing queue.
@@ -311,13 +300,18 @@ public:
*/
// void dequeue_all (void);
+ /// Register the handler with the reactor.
/**
* Register the handler with the reactor. This method is used by the
* Wait_On_Reactor strategy. The transport must register its event
* handler with the ORB's Reactor.
+ *
+ * @todo: I think this method is pretty much useless, the
+ * connections are *always* registered with the Reactor, except in
+ * thread-per-connection mode. In that case putting the connection
+ * in the Reactor would produce unpredictable results anyway.
*/
- int register_handler (void);
-
+ virtual int register_handler (void);
/// Write the complete Message_Block chain to the connection.
/**
@@ -357,9 +351,9 @@ public:
* down). In that case, it returns -1 and sets errno to
* <code>ENOENT</code>.
*/
- ssize_t send (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *timeout = 0);
+ virtual ssize_t send (iovec *iov, int iovcnt,
+ size_t &bytes_transferred,
+ const ACE_Time_Value *timeout = 0) = 0;
/// Read len bytes from into buf.
/**
@@ -371,9 +365,9 @@ public:
* not clear this this is the best place to specify this. The actual
* timeout values will be kept in the Policies.
*/
- ssize_t recv (char *buffer,
- size_t len,
- const ACE_Time_Value *timeout = 0);
+ virtual ssize_t recv (char *buffer,
+ size_t len,
+ const ACE_Time_Value *timeout = 0) = 0;
/**
* @name Control connection lifecycle
@@ -411,14 +405,18 @@ public:
virtual int messaging_init (CORBA::Octet major,
CORBA::Octet minor) = 0;
-
-
/// Extracts the list of listen points from the <cdr> stream. The
/// list would have the protocol specific details of the
/// ListenPoints
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
-protected:
+ /// Memory management routines.
+ /*
+ * Forwards to event handler.
+ */
+ ACE_Event_Handler::Reference_Count add_reference (void);
+ ACE_Event_Handler::Reference_Count remove_reference (void);
+
/** @name Template methods
*
* The Transport class uses the Template Method Pattern to implement
@@ -445,71 +443,14 @@ protected:
*/
virtual ACE_Event_Handler * event_handler_i (void) = 0;
- virtual TAO_Connection_Handler * connection_handler_i (void) = 0;
+protected:
- /// Called by <code>connection_handler_closing()</code> to signal
- /// that the protocol-specific transport should dissociate itself
- /// with the protocol-specific connection handler.
- /**
- * Typically, this just sets the pointer to the associated connection
- * handler to zero, although it could also clear out any additional
- * resources associated with the handler association.
- *
- * @return The old event handler
- */
- virtual TAO_Connection_Handler * invalidate_event_handler_i (void) = 0;
+ virtual TAO_Connection_Handler * connection_handler_i (void) = 0;
/// Return the messaging object that is used to format the data that
/// needs to be sent.
virtual TAO_Pluggable_Messaging * messaging_object (void) = 0;
- /// Write the complete iovec chain to the connection.
- /**
- * Often the implementation simply forwards the arguments to the
- * underlying ACE_Svc_Handler class. Using the code factored out
- * into ACE.
- *
- * Be careful with protocols that perform non-trivial
- * transformations of the data, such as SSLIOP or protocols that
- * compress the stream.
- *
- * @param iov contains the data that must be sent.
- *
- * @param iovcnt is the number of iovec structures in the list
- * where iov points.
- *
- * @param bytes_transferred should return the total number of bytes
- * successfully transferred before the connection blocked. This is
- * required because in some platforms and/or protocols multiple
- * system calls may be required to send the chain of message
- * blocks. The first few calls can work successfully, but the final
- * one can fail or signal a flow control situation (via EAGAIN).
- * In this case the ORB expects the function to return -1, errno to
- * be appropriately set and this argument to return the number of
- * bytes already on the OS I/O subsystem.
- *
- * @param timeout is the maximum time that the application is
- * willing to wait for the data to be sent, useful in platforms that
- * implement timed writes.
- * The timeout value is obtained from the policies set by the
- * application.
- *
- */
- virtual ssize_t send_i (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *timeout = 0) = 0;
-
- // Read len bytes from into buf.
- /**
- * @param buffer ORB allocated buffer where the data should be
- * @@ The ACE_Time_Value *s is just a place holder for now. It is
- * not clear this this is the best place to specify this. The actual
- * timeout values will be kept in the Policies.
- */
- virtual ssize_t recv_i (char *buffer,
- size_t len,
- const ACE_Time_Value *timeout = 0) = 0;
-
public:
/// This is a request for the transport object to write a
@@ -527,10 +468,6 @@ public:
/// recache ourselves in the cache
int recache_transport (TAO_Transport_Descriptor_Interface* desc);
- /// Method for the connection handler to signify that it
- /// is being closed and destroyed.
- virtual void connection_handler_closing (void);
-
/// Callback to read incoming data
/**
* The ACE_Event_Handler adapter invokes this method as part of its
@@ -550,10 +487,9 @@ public:
* @param block Is deprecated and ignored.
*
*/
- virtual int handle_input_i (TAO_Resume_Handle &rh,
- ACE_Time_Value *max_wait_time = 0,
- int block = 0);
-
+ virtual int handle_input (TAO_Resume_Handle &rh,
+ ACE_Time_Value *max_wait_time = 0,
+ int block = 0);
enum
{
@@ -562,8 +498,6 @@ public:
TAO_REPLY
};
-
-
/// Prepare the waiting and demuxing strategy to receive a reply for
/// a new request.
/**
@@ -633,19 +567,7 @@ public:
const ACE_Message_Block *message_block,
ACE_Time_Value *max_wait_time);
-
protected:
- /// Register the handler with the reactor.
- /**
- * This method is used by the Wait_On_Reactor strategy. The
- * transport must register its event handler with the ORB's Reactor.
- *
- * @todo: I think this method is pretty much useless, the
- * connections are *always* registered with the Reactor, except in
- * thread-per-connection mode. In that case putting the connection
- * in the Reactor would produce unpredictable results anyway.
- */
- virtual int register_handler_i (void) = 0;
/// Called by the handle_input_i (). This method is used to parse
/// message read by the handle_input_i () call. It also decides
@@ -677,9 +599,7 @@ protected:
int consolidate_fragments (TAO_Queued_Data *qd,
TAO_Resume_Handle &rh);
-
-
- /// First consolidate the message queue. If the message is still not
+ /// First consolidate the message queue. If the message is still not
/// complete, try to read from the handle again to make it
/// complete. If these dont help put the message back in the queue
/// and try to check the queue if we have message to process. (the
@@ -703,31 +623,20 @@ protected:
/// Make a queued data from the <incoming> message block
TAO_Queued_Data *make_queued_data (ACE_Message_Block &incoming);
- /// Implement send_message_shared() assuming the handler_lock_ is
+ /// Implement send_message_shared() assuming the handler_lock_ is
/// held.
int send_message_shared_i (TAO_Stub *stub,
int message_semantics,
const ACE_Message_Block *message_block,
ACE_Time_Value *max_wait_time);
- /// Check if the underlying event handler is still valid.
- /**
- * @return Returns -1 if not, 0 if it is.
- */
- int check_event_handler_i (const char *caller);
-
public:
-
-
-
/// Send a message block chain,
int send_message_block_chain (const ACE_Message_Block *message_block,
size_t &bytes_transferred,
ACE_Time_Value *max_wait_time = 0);
-
-
/// Send a message block chain, assuming the lock is held
int send_message_block_chain_i (const ACE_Message_Block *message_block,
size_t &bytes_transferred,
@@ -787,6 +696,11 @@ public:
/// Set the state of the first_request_ flag to 0
void first_request_sent();
+
+ /// Notify all the components inside a Transport when the underlying
+ /// connection is closed.
+ void send_connection_closed_notifications (void);
+
private:
/// Helper method that returns the Transport Cache Manager.
@@ -876,7 +790,6 @@ private:
/// not pending
void reset_flush_timer (void);
-
/// Print out error messages if the event handler is not valid
void report_invalid_event_handler (const char *caller);
@@ -893,32 +806,9 @@ private:
*/
int notify_reactor (void);
- /// Grab the mutex and then call invalidate_event_handler_i()
- TAO_Connection_Handler * invalidate_event_handler (void);
-
- /// Notify all the components inside a Transport when the underlying
- /// connection is closed.
- void send_connection_closed_notifications (void);
-
/// Assume the lock is held
void send_connection_closed_notifications_i (void);
- /// Implement close_connection() assuming the handler_lock_ is held.
- void close_connection_i (void);
-
- /// This class needs priviledged access to:
- /// close_connection_no_purge ()
- friend class TAO_Transport_Cache_Manager;
-
- /// Close the underlying connection, do not purge the entry from the
- /// map (supposedly it was purged already, trust the caller, yuck!)
- void close_connection_no_purge (void);
-
- /// Close the underlying connection, implements the code shared by
- /// all the close_connection_* variants.
- void close_connection_shared (int purge,
- TAO_Connection_Handler * eh);
-
/// Prohibited
ACE_UNIMPLEMENTED_FUNC (TAO_Transport (const TAO_Transport&))
ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Transport&))
@@ -1005,6 +895,7 @@ protected:
unsigned long purging_order_;
private:
+
/// @@Phil, I think it would be nice if we could think of a way to
/// do the following.
/// We have been trying to use the transport for marking about
diff --git a/TAO/tao/Transport.inl b/TAO/tao/Transport.inl
index 53da1d841b9..ab9770b43f4 100644
--- a/TAO/tao/Transport.inl
+++ b/TAO/tao/Transport.inl
@@ -44,7 +44,6 @@ TAO_Transport::cache_map_entry (void)
return this->cache_map_entry_;
}
-
ACE_INLINE void
TAO_Transport::cache_map_entry (
TAO_Transport_Cache_Manager::HASH_MAP_ENTRY *entry)
@@ -90,8 +89,6 @@ TAO_Transport::queue_is_empty (void)
return this->queue_is_empty_i ();
}
-
-
ACE_INLINE int
TAO_Transport::flush_timer_pending (void) const
{
@@ -105,20 +102,6 @@ TAO_Transport::reset_flush_timer (void)
this->current_deadline_ = ACE_Time_Value::zero;
}
-ACE_INLINE int
-TAO_Transport::check_event_handler_i (const char *caller)
-{
- // if there's no associated event handler, then we act like a null
- // transport
- if (this->event_handler_i () == 0)
- {
- this->report_invalid_event_handler (caller);
- errno = ENOENT;
- return -1;
- }
- return 0;
-}
-
//********************************************************************
// codeset related methods
@@ -162,17 +145,17 @@ TAO_Transport::first_request_sent (void)
this->first_request_ = 0;
}
-
-
/*****************************************************/
+
ACE_INLINE
TAO_Transport_Refcount_Guard::TAO_Transport_Refcount_Guard (TAO_Transport *t)
- :tr_ (TAO_Transport::_duplicate (t))
+ : tr_ (t)
{
+ this->tr_->add_reference ();
}
ACE_INLINE
TAO_Transport_Refcount_Guard::~TAO_Transport_Refcount_Guard (void)
{
- TAO_Transport::release (this->tr_);
+ this->tr_->remove_reference ();
}
diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp
index f8a86092834..71259cb5797 100644
--- a/TAO/tao/Transport_Cache_Manager.cpp
+++ b/TAO/tao/Transport_Cache_Manager.cpp
@@ -13,12 +13,10 @@
# include "tao/Transport_Cache_Manager.inl"
#endif /* __ACE_INLINE__ */
-
ACE_RCSID (TAO,
Transport_Cache_Manager,
"$Id$")
-
TAO_Transport_Cache_Manager::TAO_Transport_Cache_Manager (TAO_ORB_Core &orb_core)
: percent_ (orb_core.resource_factory ()->purge_percentage ()),
purging_strategy_ (orb_core.resource_factory ()->create_purging_strategy ()),
@@ -98,8 +96,6 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
// are holding our lock
this->purging_strategy_->update_item (int_id.transport ());
-
-
int retval = this->cache_map_.bind (ext_id,
int_id,
entry);
@@ -119,7 +115,6 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
"Trying with a new index\n"));
}
-
// There was an entry like this before, so let us do some
// minor adjustments and rebind
retval = this->get_last_index_bind (ext_id,
@@ -195,8 +190,6 @@ TAO_Transport_Cache_Manager::find (const TAO_Cache_ExtId &key,
return status;
}
-
-
int
TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key,
TAO_Cache_IntId &value)
@@ -279,7 +272,6 @@ TAO_Transport_Cache_Manager::make_idle_i (HASH_MAP_ENTRY *&entry)
new_entry);
if (retval == 0)
{
-
new_entry->int_id_.
recycle_state (ACE_RECYCLABLE_IDLE_AND_PURGABLE);
@@ -305,7 +297,6 @@ TAO_Transport_Cache_Manager::make_idle_i (HASH_MAP_ENTRY *&entry)
return retval;
}
-
int
TAO_Transport_Cache_Manager::update_entry (HASH_MAP_ENTRY *&entry)
{
@@ -328,8 +319,7 @@ TAO_Transport_Cache_Manager::update_entry (HASH_MAP_ENTRY *&entry)
}
int
-TAO_Transport_Cache_Manager::close_i (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered)
+TAO_Transport_Cache_Manager::close_i (TAO_Connection_Handler_Set &handlers)
{
HASH_MAP_ITER end_iter =
this->cache_map_.end ();
@@ -343,10 +333,8 @@ TAO_Transport_Cache_Manager::close_i (ACE_Handle_Set &reactor_registered,
if ((*iter).int_id_.recycle_state () != ACE_RECYCLABLE_CLOSED)
{
- // Get the transport to fill its associated connection's handle in
- // the handle sets.
- (*iter).int_id_.transport ()->provide_handle (reactor_registered,
- unregistered);
+ // Get the transport to fill its associated connection's handler.
+ (*iter).int_id_.transport ()->provide_handler (handlers);
// Inform the transport that has a reference to the entry in the
// map that we are *gone* now. So, the transport should not use
// the reference to the entry that he has, to acces us *at any
@@ -484,12 +472,13 @@ TAO_Transport_Cache_Manager::purge (void)
int count = 0;
for(int i = 0; count < amount && i < sorted_size; i++)
{
- if (this->is_entry_idle(sorted_set[i]))
+ if (this->is_entry_idle (sorted_set[i]))
{
sorted_set[i]->int_id_.recycle_state (ACE_RECYCLABLE_BUSY);
TAO_Transport* transport = sorted_set[i]->int_id_.transport ();
- if (transports_to_be_closed.push (TAO_Transport::_duplicate(transport)) != 0)
+ transport->add_reference ();
+ if (transports_to_be_closed.push (transport) != 0)
{
ACE_DEBUG ((LM_INFO,
ACE_TEXT ("TAO (%P|%t) - ")
@@ -505,16 +494,6 @@ TAO_Transport_Cache_Manager::purge (void)
transport->id ()));
}
- // We need to save the cache_map_entry before we
- // set it to zero, so we can call purge_entry_i()
- // after we call close_connection_no_purge ().
- HASH_MAP_ENTRY* entry = transport->cache_map_entry ();
-
- // This is a bit ugly, but we must do this to
- // avoid taking and giving locks inside this loop.
- transport->cache_map_entry (0);
- this->purge_entry_i (entry);
-
// Count this as a successful purged entry
count++;
}
@@ -533,8 +512,10 @@ TAO_Transport_Cache_Manager::purge (void)
if (transports_to_be_closed.pop (transport) == 0)
{
if (transport)
- transport->close_connection_no_purge ();
- TAO_Transport::release (transport);
+ {
+ transport->close_connection ();
+ transport->remove_reference ();
+ }
}
}
diff --git a/TAO/tao/Transport_Cache_Manager.h b/TAO/tao/Transport_Cache_Manager.h
index b1a0e43cfe4..d5d16c8c4ff 100644
--- a/TAO/tao/Transport_Cache_Manager.h
+++ b/TAO/tao/Transport_Cache_Manager.h
@@ -17,20 +17,14 @@
#include "tao/Cache_Entries.h"
-
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#define ACE_LACKS_PRAGMA_ONCE
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/Hash_Map_Manager_T.h"
#include "ace/Synch_T.h"
-// #include "tao/TAO_Export.h"
-// #include "tao/Cache_Entries.h"
-// #include "tao/Connection_Purging_Strategy.h"
-
-
class ACE_Handle_Set;
-class ACE_Event_Handler;
+class TAO_Connection_Handler;
class TAO_ORB_Core;
class TAO_Resource_Factory;
class TAO_Connection_Purging_Strategy;
@@ -39,9 +33,7 @@ template <class ACE_COND_MUTEX> class TAO_Condition;
template <class T> class ACE_Unbounded_Set;
template <class T> class ACE_Unbounded_Set_Iterator;
-typedef ACE_Unbounded_Set<ACE_Event_Handler*> TAO_EventHandlerSet;
-typedef ACE_Unbounded_Set_Iterator<ACE_Event_Handler*>
- TAO_EventHandlerSetIterator;
+typedef ACE_Unbounded_Set<TAO_Connection_Handler*> TAO_Connection_Handler_Set;
/**
* @class TAO_Transport_Cache_Manager
@@ -119,10 +111,9 @@ public:
/// strategy policy information.
int update_entry (HASH_MAP_ENTRY *&entry);
- /// Close the underlying hash map manager and return the handle set
- /// that have been registered with the reactor
- int close (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered);
+ /// Close the underlying hash map manager and return any handlers
+ /// still registered
+ int close (TAO_Connection_Handler_Set &handlers);
/// Return the current size of the cache.
size_t current_size (void) const;
@@ -169,8 +160,7 @@ private:
int make_idle_i (HASH_MAP_ENTRY *&entry);
/// Non-locking version and actual implementation of close ()
- int close_i (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered);
+ int close_i (TAO_Connection_Handler_Set &handlers);
/// Purge the entry from the Cache Map
int purge_entry_i (HASH_MAP_ENTRY *&entry);
diff --git a/TAO/tao/Transport_Cache_Manager.inl b/TAO/tao/Transport_Cache_Manager.inl
index edb29408083..9163ef1907d 100644
--- a/TAO/tao/Transport_Cache_Manager.inl
+++ b/TAO/tao/Transport_Cache_Manager.inl
@@ -108,8 +108,7 @@ TAO_Transport_Cache_Manager::make_idle (HASH_MAP_ENTRY *&entry)
ACE_INLINE int
-TAO_Transport_Cache_Manager::close (ACE_Handle_Set &reactor_registered,
- TAO_EventHandlerSet &unregistered)
+TAO_Transport_Cache_Manager::close (TAO_Connection_Handler_Set &handlers)
{
// The cache lock pointer should only be zero if
// Transport_Cache_Manager::open() was never called. Note that
@@ -123,7 +122,7 @@ TAO_Transport_Cache_Manager::close (ACE_Handle_Set &reactor_registered,
*this->cache_lock_,
-1));
- return this->close_i (reactor_registered, unregistered);
+ return this->close_i (handlers);
}
diff --git a/TAO/tao/Wait_On_Read.cpp b/TAO/tao/Wait_On_Read.cpp
index 572554525fb..36968e49e46 100644
--- a/TAO/tao/Wait_On_Read.cpp
+++ b/TAO/tao/Wait_On_Read.cpp
@@ -36,9 +36,9 @@ TAO_Wait_On_Read::wait (ACE_Time_Value * max_wait_time,
while (1)
{
retval =
- this->transport_->handle_input_i (rh,
- max_wait_time,
- 1);
+ this->transport_->handle_input (rh,
+ max_wait_time,
+ 1);
// If we got our reply, no need to run the loop any
// further.
diff --git a/TAO/tao/tao.mpc b/TAO/tao/tao.mpc
index c7f7b65a780..a859cafea49 100644
--- a/TAO/tao/tao.mpc
+++ b/TAO/tao/tao.mpc
@@ -16,7 +16,6 @@ project : acelib, taoversion, core {
Transport_Connector.cpp
Transport.cpp
Incoming_Message_Queue.cpp
- Notify_Handler.cpp
Resume_Handle.cpp
Profile.cpp
Endpoint.cpp
diff --git a/TAO/tests/Connection_Timeout/client.dsp b/TAO/tests/Connection_Timeout/client.dsp
index ce4579b8d37..9c6ca00d197 100644
--- a/TAO/tests/Connection_Timeout/client.dsp
+++ b/TAO/tests/Connection_Timeout/client.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="Hello Client" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="Connection_Timeout Client" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=Hello Client - Win32 Debug
+CFG=Connection_Timeout Client - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=Hello Client - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="Hello Client - Win32 Debug"
+!MESSAGE NMAKE /f "client.mak" CFG="Connection_Timeout Client - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "Hello Client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Hello Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "Connection_Timeout Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Connection_Timeout Client - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=Hello Client - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "Hello Client - Win32 Release"
+!IF "$(CFG)" == "Connection_Timeout Client - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -53,7 +53,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 TAO_Messaging.lib tao.lib ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\tao\Messaging" /libpath:"..\..\..\ace" /libpath:"..\..\tao"
-!ELSEIF "$(CFG)" == "Hello Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "Connection_Timeout Client - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -83,8 +83,8 @@ LINK32=link.exe
# Begin Target
-# Name "Hello Client - Win32 Release"
-# Name "Hello Client - Win32 Debug"
+# Name "Connection_Timeout Client - Win32 Release"
+# Name "Connection_Timeout Client - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ".cpp"
@@ -109,7 +109,7 @@ SOURCE=.\TestC.cpp
SOURCE=.\Test.idl
-!IF "$(CFG)" == "Hello Client - Win32 Release"
+!IF "$(CFG)" == "Connection_Timeout Client - Win32 Release"
# PROP Ignore_Default_Tool 1
USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
@@ -148,7 +148,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "Hello Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "Connection_Timeout Client - Win32 Debug"
USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
diff --git a/TAO/tests/MProfile_Connection_Timeout/client.dsp b/TAO/tests/MProfile_Connection_Timeout/client.dsp
index 51b6dc3ecea..e51e2b93b70 100644
--- a/TAO/tests/MProfile_Connection_Timeout/client.dsp
+++ b/TAO/tests/MProfile_Connection_Timeout/client.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="MProfile Client" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="MProfile_Connection_Timeout Client" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=MProfile Client - Win32 Debug
+CFG=MProfile_Connection_Timeout Client - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=MProfile Client - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="MProfile Client - Win32 Debug"
+!MESSAGE NMAKE /f "client.mak" CFG="MProfile_Connection_Timeout Client - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "MProfile Client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "MProfile Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MProfile_Connection_Timeout Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MProfile_Connection_Timeout Client - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=MProfile Client - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "MProfile Client - Win32 Release"
+!IF "$(CFG)" == "MProfile_Connection_Timeout Client - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -54,7 +54,7 @@ LINK32=link.exe
# ADD LINK32 ace.lib TAO.lib TAO_IORManip.lib TAO_Messaging.lib /nologo /subsystem:console /debug /machine:I386 /out:"Release/client.exe" /pdbtype:sept /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\IORManipulation" /libpath:"..\..\tao\Messaging"
# SUBTRACT LINK32 /pdb:none
-!ELSEIF "$(CFG)" == "MProfile Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "MProfile_Connection_Timeout Client - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -84,8 +84,8 @@ LINK32=link.exe
# Begin Target
-# Name "MProfile Client - Win32 Release"
-# Name "MProfile Client - Win32 Debug"
+# Name "MProfile_Connection_Timeout Client - Win32 Release"
+# Name "MProfile_Connection_Timeout Client - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -114,7 +114,7 @@ SOURCE=.\testC.h
SOURCE=.\test.idl
-!IF "$(CFG)" == "MProfile Client - Win32 Release"
+!IF "$(CFG)" == "MProfile_Connection_Timeout Client - Win32 Release"
USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO's IDL Compiler on $(InputPath)
@@ -152,7 +152,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "MProfile Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "MProfile_Connection_Timeout Client - Win32 Debug"
USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO's IDL Compiler on $(InputPath)
diff --git a/TAO/tests/MProfile_Connection_Timeout/server.dsp b/TAO/tests/MProfile_Connection_Timeout/server.dsp
index 92b0a57aee8..67a59ed66ca 100644
--- a/TAO/tests/MProfile_Connection_Timeout/server.dsp
+++ b/TAO/tests/MProfile_Connection_Timeout/server.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="MProfile Server" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="MProfile_Connection_Timeout Server" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=MProfile Server - Win32 Debug
+CFG=MProfile_Connection_Timeout Server - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=MProfile Server - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="MProfile Server - Win32 Debug"
+!MESSAGE NMAKE /f "server.mak" CFG="MProfile_Connection_Timeout Server - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "MProfile Server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "MProfile Server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MProfile_Connection_Timeout Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MProfile_Connection_Timeout Server - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=MProfile Server - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "MProfile Server - Win32 Release"
+!IF "$(CFG)" == "MProfile_Connection_Timeout Server - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -53,7 +53,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\lib" /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\IORManipulation"
-!ELSEIF "$(CFG)" == "MProfile Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "MProfile_Connection_Timeout Server - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -82,8 +82,8 @@ LINK32=link.exe
# Begin Target
-# Name "MProfile Server - Win32 Release"
-# Name "MProfile Server - Win32 Debug"
+# Name "MProfile_Connection_Timeout Server - Win32 Release"
+# Name "MProfile_Connection_Timeout Server - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -124,7 +124,7 @@ SOURCE=.\testS.h
SOURCE=.\test.idl
-!IF "$(CFG)" == "MProfile Server - Win32 Release"
+!IF "$(CFG)" == "MProfile_Connection_Timeout Server - Win32 Release"
USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
# Begin Custom Build - Invoking TAO's IDL Compiler on $(InputPath)
@@ -162,7 +162,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "MProfile Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "MProfile_Connection_Timeout Server - Win32 Debug"
USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO's IDL Compiler on $(InputPath)
diff --git a/TAO/tests/MT_BiDir/client.dsp b/TAO/tests/MT_BiDir/client.dsp
index d84c65a123b..377d0949356 100644
--- a/TAO/tests/MT_BiDir/client.dsp
+++ b/TAO/tests/MT_BiDir/client.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="BiDir Client" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="MT_BiDir Client" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=BiDir Client - Win32 Debug
+CFG=MT_BiDir Client - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=BiDir Client - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "client.mak" CFG="BiDir Client - Win32 Debug"
+!MESSAGE NMAKE /f "client.mak" CFG="MT_BiDir Client - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "BiDir Client - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "BiDir Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_BiDir Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_BiDir Client - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=BiDir Client - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "BiDir Client - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Client - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -54,7 +54,7 @@ LINK32=link.exe
# ADD LINK32 ace.lib tao.lib TAO_PortableServer.lib TAO_BiDirGIOP.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\BiDir_GIOP"
# SUBTRACT LINK32 /pdb:none
-!ELSEIF "$(CFG)" == "BiDir Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Client - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -84,8 +84,8 @@ LINK32=link.exe
# Begin Target
-# Name "BiDir Client - Win32 Release"
-# Name "BiDir Client - Win32 Debug"
+# Name "MT_BiDir Client - Win32 Release"
+# Name "MT_BiDir Client - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -151,7 +151,7 @@ SOURCE=.\SenderC.h
SOURCE=.\Receiver.idl
-!IF "$(CFG)" == "BiDir Client - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Client - Win32 Release"
# Begin Custom Build
InputPath=.\Receiver.idl
@@ -188,7 +188,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "BiDir Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Client - Win32 Debug"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Receiver.idl
@@ -232,7 +232,7 @@ BuildCmds= \
SOURCE=.\Sender.idl
-!IF "$(CFG)" == "BiDir Client - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Client - Win32 Release"
# Begin Custom Build
InputPath=.\Sender.idl
@@ -269,7 +269,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "BiDir Client - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Client - Win32 Debug"
# Begin Custom Build - Invoking TAO_IDL Compiler
InputPath=.\Sender.idl
diff --git a/TAO/tests/MT_BiDir/server.dsp b/TAO/tests/MT_BiDir/server.dsp
index 72938a046d0..bda4accfffc 100644
--- a/TAO/tests/MT_BiDir/server.dsp
+++ b/TAO/tests/MT_BiDir/server.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="BiDir Server" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="MT_BiDir Server" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=BiDir Server - Win32 Debug
+CFG=MT_BiDir Server - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=BiDir Server - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="BiDir Server - Win32 Debug"
+!MESSAGE NMAKE /f "server.mak" CFG="MT_BiDir Server - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "BiDir Server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "BiDir Server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_BiDir Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "MT_BiDir Server - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=BiDir Server - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "BiDir Server - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Server - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -54,7 +54,7 @@ LINK32=link.exe
# ADD LINK32 ace.lib tao.lib TAO_PortableServer.lib TAO_BiDirGIOP.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer" /libpath:"..\..\tao\BiDir_GIOP"
# SUBTRACT LINK32 /pdb:none
-!ELSEIF "$(CFG)" == "BiDir Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Server - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -84,8 +84,8 @@ LINK32=link.exe
# Begin Target
-# Name "BiDir Server - Win32 Release"
-# Name "BiDir Server - Win32 Debug"
+# Name "MT_BiDir Server - Win32 Release"
+# Name "MT_BiDir Server - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@@ -151,7 +151,7 @@ SOURCE=.\Server_Task.h
SOURCE=.\Receiver.idl
-!IF "$(CFG)" == "BiDir Server - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Server - Win32 Release"
# Begin Custom Build
InputPath=.\Receiver.idl
@@ -188,7 +188,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "BiDir Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Server - Win32 Debug"
# Begin Custom Build
InputPath=.\Receiver.idl
@@ -232,7 +232,7 @@ BuildCmds= \
SOURCE=.\Sender.idl
-!IF "$(CFG)" == "BiDir Server - Win32 Release"
+!IF "$(CFG)" == "MT_BiDir Server - Win32 Release"
# Begin Custom Build
InputPath=.\Sender.idl
@@ -269,7 +269,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "BiDir Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "MT_BiDir Server - Win32 Debug"
# Begin Custom Build
InputPath=.\Sender.idl
diff --git a/TAO/tests/ORB_shutdown/server.dsp b/TAO/tests/ORB_shutdown/server.dsp
index 1b8448b5ce0..5eeab6b5a1f 100644
--- a/TAO/tests/ORB_shutdown/server.dsp
+++ b/TAO/tests/ORB_shutdown/server.dsp
@@ -1,10 +1,10 @@
-# Microsoft Developer Studio Project File - Name="Foo_Bar Server" - Package Owner=<4>
+# Microsoft Developer Studio Project File - Name="ORB_shutdown Server" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
-CFG=Foo_Bar Server - Win32 Debug
+CFG=ORB_shutdown Server - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,12 @@ CFG=Foo_Bar Server - Win32 Debug
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "server.mak" CFG="Foo_Bar Server - Win32 Debug"
+!MESSAGE NMAKE /f "server.mak" CFG="ORB_shutdown Server - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
-!MESSAGE "Foo_Bar Server - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "Foo_Bar Server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ORB_shutdown Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ORB_shutdown Server - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
@@ -28,7 +28,7 @@ CFG=Foo_Bar Server - Win32 Debug
CPP=cl.exe
RSC=rc.exe
-!IF "$(CFG)" == "Foo_Bar Server - Win32 Release"
+!IF "$(CFG)" == "ORB_shutdown Server - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
@@ -53,7 +53,7 @@ LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\ace" /libpath:"..\..\tao" /libpath:"..\..\tao\PortableServer"
-!ELSEIF "$(CFG)" == "Foo_Bar Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "ORB_shutdown Server - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
@@ -82,8 +82,8 @@ LINK32=link.exe
# Begin Target
-# Name "Foo_Bar Server - Win32 Release"
-# Name "Foo_Bar Server - Win32 Debug"
+# Name "ORB_shutdown Server - Win32 Release"
+# Name "ORB_shutdown Server - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter ".cpp"
@@ -120,7 +120,7 @@ SOURCE=.\Foo_Bar.h
SOURCE=.\Test.idl
-!IF "$(CFG)" == "Foo_Bar Server - Win32 Release"
+!IF "$(CFG)" == "ORB_shutdown Server - Win32 Release"
# PROP Ignore_Default_Tool 1
USERDEP__TEST_="..\..\..\bin\Release\tao_idl.exe"
@@ -159,7 +159,7 @@ BuildCmds= \
$(BuildCmds)
# End Custom Build
-!ELSEIF "$(CFG)" == "Foo_Bar Server - Win32 Debug"
+!ELSEIF "$(CFG)" == "ORB_shutdown Server - Win32 Debug"
USERDEP__TEST_="..\..\..\bin\tao_idl.exe"
# Begin Custom Build - Invoking TAO_IDL Compiler
diff --git a/TAO/tests/TAO_Tests.dsw b/TAO/tests/TAO_Tests.dsw
index e728d7697fd..14ee9f5f694 100644
--- a/TAO/tests/TAO_Tests.dsw
+++ b/TAO/tests/TAO_Tests.dsw
@@ -3,6 +3,54 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
+Project: "AMH_Exceptions_Test Client"=.\AMH_Exceptions\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "AMH_Exceptions_Test Server"=.\AMH_Exceptions\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "AMH_Oneway_Test Client"=.\AMH_Oneway\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "AMH_Oneway_Test Server"=.\AMH_Oneway\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "AMI Timeout Client"=.\AMI_Timeouts\client.dsp - Package Owner=<4>
Package=<5>
@@ -99,6 +147,30 @@ Package=<4>
###############################################################################
+Project: "Abstract Interface Client"=.\Abstract_Interface\Abstract_Interface_Client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Abstract Interface Server"=.\Abstract_Interface\Abstract_Interface_Server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "BiDir Client"=.\BiDirectional\client.dsp - Package Owner=<4>
Package=<5>
@@ -267,7 +339,7 @@ Package=<4>
###############################################################################
-Project: "Bug 1020 Basic Regression Client"=.\Bug_1020_Basic_Regression\client.dsp - Package Owner=<4>
+Project: "Bug_1020_Basic_Regression Client"=.\Bug_1020_Basic_Regression\client.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -279,7 +351,7 @@ Package=<4>
###############################################################################
-Project: "Bug 1020 Basic Regression Server"=.\Bug_1020_Basic_Regression\server.dsp - Package Owner=<4>
+Project: "Bug_1020_Basic_Regression Server"=.\Bug_1020_Basic_Regression\server.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -291,7 +363,7 @@ Package=<4>
###############################################################################
-Project: "Bug 1020 Regression Client"=.\Bug_1020_Regression\client.dsp - Package Owner=<4>
+Project: "Bug_1020_Regression Client"=.\Bug_1020_Regression\client.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -303,7 +375,7 @@ Package=<4>
###############################################################################
-Project: "Bug 1020 Regression Server"=.\Bug_1020_Regression\server.dsp - Package Owner=<4>
+Project: "Bug_1020_Regression Server"=.\Bug_1020_Regression\server.dsp - Package Owner=<4>
Package=<5>
{{{
@@ -495,6 +567,42 @@ Package=<4>
###############################################################################
+Project: "Collocation_Test"=.\Collocation_Tests\Collocation_Test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Connect_Strategy_Test Client"=.\Connect_Strategy_Test\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Connect_Strategy_Test Server"=.\Connect_Strategy_Test\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "Connection Purging Client"=.\Connection_Purging\client.dsp - Package Owner=<4>
Package=<5>
@@ -801,6 +909,18 @@ Package=<4>
###############################################################################
+Project: "Connection_Timeout Client"=.\Connection_Timeout\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "Hello Client"=.\Hello\client.dsp - Package Owner=<4>
Package=<5>
@@ -1713,6 +1833,342 @@ Package=<4>
###############################################################################
+Project: "Bug_1482_Regression Client"=.\Bug_1482_Regression\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Bug_1482_Regression Server"=.\Bug_1482_Regression\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Two_Objects Client"=.\Two_Objects\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Two_Objects Server"=.\Two_Objects\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Strategies Client"=.\Strategies\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Strategies Server"=.\Strategies\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Stack_Recursion Client"=.\Stack_Recursion\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Stack_Recursion Server"=.\Stack_Recursion\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Manipulation"=.\Policies\Manipulation.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Oneway_Buffering Client"=.\Oneway_Buffering\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Oneway_Buffering Server"=.\Oneway_Buffering\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Oneway_Buffering Admin"=.\Oneway_Buffering\admin.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Objref_Sequence_Test Client"=.\Objref_Sequence_Test\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Objref_Sequence_Test Server"=.\Objref_Sequence_Test\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "ORB_shutdown Server"=.\ORB_shutdown\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "No_Server_MT_Connect_Test Client"=.\No_Server_MT_Connect_Test\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "No_Server_MT_Connect_Test Server"=.\No_Server_MT_Connect_Test\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Nested_Upcall_Crash Scavenger"=.\Nested_Upcall_Crash\scavenger.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Nested_Upcall_Crash Client"=.\Nested_Upcall_Crash\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Nested_Upcall_Crash Server"=.\Nested_Upcall_Crash\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Muxed_GIOP_Versions Client"=.\Muxed_GIOP_Versions\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Muxed_GIOP_Versions Server"=.\Muxed_GIOP_Versions\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "MT_BiDir Client"=.\MT_BiDir\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "MT_BiDir Server"=.\MT_BiDir\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "MProfile_Connection_Timeout Client"=.\MProfile_Connection_Timeout\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "MProfile_Connection_Timeout Server"=.\MProfile_Connection_Timeout\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "File_IO Client"=.\File_IO\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "File_IO Server"=.\File_IO\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "idl_test"=.\IDL_Test\idl_test.dsp - Package Owner=<4>
Package=<5>