summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-10-29 15:08:10 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-10-29 15:08:10 +0000
commit865584ac993a0e627ae39a0e6adcc82aadab3d22 (patch)
treed81d88521bffaf0c5b1b1d42e1bec23d2662e5d4
parente09529a91c36e95fb02f9a3b33e6cf044bd3426b (diff)
downloadATCD-865584ac993a0e627ae39a0e6adcc82aadab3d22.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Cache_Entries.inl12
-rw-r--r--TAO/tao/Connection_Cache_Manager.cpp20
-rw-r--r--TAO/tao/Exclusive_TMS.cpp6
-rw-r--r--TAO/tao/IIOP_Connect.cpp8
-rw-r--r--TAO/tao/IIOP_Connector.cpp50
-rw-r--r--TAO/tao/IIOP_Endpoint.cpp1
-rw-r--r--TAO/tao/Pluggable.cpp2
7 files changed, 52 insertions, 47 deletions
diff --git a/TAO/tao/Cache_Entries.inl b/TAO/tao/Cache_Entries.inl
index 0f16e744b0e..ed526caabe3 100644
--- a/TAO/tao/Cache_Entries.inl
+++ b/TAO/tao/Cache_Entries.inl
@@ -96,16 +96,20 @@ TAO_Cache_ExtId::~TAO_Cache_ExtId (void)
ACE_INLINE
TAO_Cache_ExtId::TAO_Cache_ExtId (const TAO_Cache_ExtId &rhs)
{
- this->connection_property_ = rhs.connection_property_;
- this->is_delete_ = rhs.is_delete_;
+ // Do a deep copy
+ this->connection_property_ =
+ rhs.connection_property_->duplicate ();
+ this->is_delete_ = 1;
this->index_ = rhs.index_;
}
ACE_INLINE void
TAO_Cache_ExtId::operator= (const TAO_Cache_ExtId &rhs)
{
- this->connection_property_ = rhs.connection_property_;
- this->is_delete_ = rhs.is_delete_;
+ // Do a deep copy
+ this->connection_property_ =
+ rhs.connection_property_->duplicate ();
+ this->is_delete_ = 1;
this->index_ = rhs.index_;
}
diff --git a/TAO/tao/Connection_Cache_Manager.cpp b/TAO/tao/Connection_Cache_Manager.cpp
index dc07a457888..d432ced3a56 100644
--- a/TAO/tao/Connection_Cache_Manager.cpp
+++ b/TAO/tao/Connection_Cache_Manager.cpp
@@ -29,10 +29,6 @@ int
TAO_Connection_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
TAO_Cache_IntId &int_id)
{
- // First call duplicate on the ext_id ie. make a copy of the
- // contents
- ext_id.duplicate ();
-
// Get the entry too
HASH_MAP_ENTRY *entry = 0;
int retval = this->cache_map_.bind (ext_id,
@@ -46,6 +42,14 @@ TAO_Connection_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
}
else if (retval == 1)
{
+ if (TAO_debug_level > 0 && retval != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::bind_i")
+ ACE_TEXT (" unable to bind in the first attempt")
+ ACE_TEXT (" so trying with a new index \n")));
+ }
+
// There was an entry like this before, so let us do some
// minor adjustments
retval = this->get_last_index_bind (ext_id,
@@ -59,7 +63,7 @@ TAO_Connection_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::bind_i")
- ACE_TEXT ("unable to bind \n")));
+ ACE_TEXT (" unable to bind \n")));
}
return retval;
@@ -90,7 +94,7 @@ TAO_Connection_Cache_Manager::find_i (const TAO_Cache_ExtId &key,
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_Connection_Cache_Manager::find_i")
- ACE_TEXT ("unable to locate a free connection \n")));
+ ACE_TEXT (" unable to locate a free connection \n")));
}
}
@@ -160,7 +164,6 @@ TAO_Connection_Cache_Manager::mark_closed_i (HASH_MAP_ENTRY *&entry)
// cache map in the mean time)
HASH_MAP_ENTRY *new_entry = 0;
- cout << "Just gettin the size " << this->total_size () <<endl;
int retval = this->cache_map_.find (entry->ext_id_,
new_entry);
if (retval == 0)
@@ -183,7 +186,6 @@ TAO_Connection_Cache_Manager::mark_closed_i (HASH_MAP_ENTRY *&entry)
int
TAO_Connection_Cache_Manager::close_i (void)
{
- cout << "We are closing now " <<endl;
// Call the close the on the Hash Map that we hold
return this->cache_map_.close ();
}
@@ -196,8 +198,6 @@ TAO_Connection_Cache_Manager::
{
CORBA::ULong ctr = entry->ext_id_.index ();
- cout << "Counter is " << ctr << endl;
-
// Start looking at the succesive elements
while (entry->next_ != 0 &&
entry->next_->ext_id_.index () != 0)
diff --git a/TAO/tao/Exclusive_TMS.cpp b/TAO/tao/Exclusive_TMS.cpp
index 2086aef885e..53559e92099 100644
--- a/TAO/tao/Exclusive_TMS.cpp
+++ b/TAO/tao/Exclusive_TMS.cpp
@@ -27,6 +27,10 @@ TAO_Exclusive_TMS::~TAO_Exclusive_TMS (void)
CORBA::ULong
TAO_Exclusive_TMS::request_id (void)
{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) TAO_Exclusive_TMS::request_id - <%d>\n"),
+ this->request_id_generator_));
return this->request_id_generator_++;
}
@@ -69,7 +73,7 @@ TAO_Exclusive_TMS::dispatch_reply (CORBA::ULong request_id,
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO_Exclusive_TMS::dispatch_reply - <%d != %d>\n"),
+ ACE_TEXT ("(%P|%t) TAO_Exclusive_TMS::dispatch_reply - <%d != %d>\n"),
this->request_id_, request_id));
return 0;
}
diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp
index 8edaa50ebcb..2124a82173f 100644
--- a/TAO/tao/IIOP_Connect.cpp
+++ b/TAO/tao/IIOP_Connect.cpp
@@ -239,8 +239,6 @@ TAO_IIOP_Server_Connection_Handler::handle_input_i (ACE_HANDLE,
this->transport_.message_state_,
max_wait_time);
- cout << "The result is amba " << result << endl;
-
if (result == -1 && TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
@@ -440,9 +438,6 @@ TAO_IIOP_Client_Connection_Handler::handle_close (ACE_HANDLE handle,
ACE_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::")
ACE_TEXT ("handle_close (%d, %d)\n"), handle, rm));
- // Mark the handle as closed in the Cache
- this->mark_closed ();
-
// Deregister this handler with the ACE_Reactor.
return this->handle_cleanup ();
}
@@ -463,9 +458,6 @@ TAO_IIOP_Client_Connection_Handler::handle_close_i (ACE_HANDLE handle,
ACE_TEXT ("TAO (%P|%t) IIOP_Client_Connection_Handler::")
ACE_TEXT ("handle_close_i (%d, %d)\n"), handle, rm));
- // Mark the handle as closed in the Cache
- this->mark_closed ();
-
// Deregister this handler with the ACE_Reactor.
return this->handle_cleanup ();
}
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index 0ee63d89218..2b27d021a49 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -186,6 +186,10 @@ TAO_IIOP_Connector::connect (TAO_Base_Connection_Property *prop,
// Check the Cache first for connections
if (this->find_handler (prop, conn_handler) == 0)
{
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) IIOP_Connector::connect ")
+ ACE_TEXT ("got an existing connection \n")));
// We have found a connection and a handler
svc_handler =
ACE_dynamic_cast (TAO_IIOP_Client_Connection_Handler *,
@@ -223,16 +227,31 @@ TAO_IIOP_Connector::connect (TAO_Base_Connection_Property *prop,
remote_address);
}
- cout << "Did we get here 1" <<endl;
- // Add the handler to Cache
- int retval = this->add_handler (prop,
- svc_handler);
-
- cout << "Did we get here " <<endl;
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P|%t) IIOP_Connector::connect ")
- ACE_TEXT ("added the new connection to Cache \n")));
+ ACE_TEXT ("The result is <%d> \n"), result));
+
+ if (result == -1)
+ {
+ // Give users a clue to the problem.
+ if (TAO_debug_level)
+ {
+ ACE_DEBUG ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) %s:%u, connection to ")
+ ACE_TEXT ("%s:%d failed (%p)\n"),
+ __FILE__,
+ __LINE__,
+ iiop_endpoint->host (),
+ iiop_endpoint->port (),
+ "errno"));
+ }
+ return -1;
+ }
+
+ // Add the handler to Cache
+ int retval = this->add_handler (prop,
+ svc_handler);
if (retval != 0 && TAO_debug_level > 0)
{
@@ -242,22 +261,7 @@ TAO_IIOP_Connector::connect (TAO_Base_Connection_Property *prop,
}
}
- if (result == -1)
- {
- // Give users a clue to the problem.
- if (TAO_orbdebug)
- {
- ACE_DEBUG ((LM_ERROR,
- ACE_TEXT ("(%P|%t) %s:%u, connection to ")
- ACE_TEXT ("%s:%d failed (%p)\n"),
- __FILE__,
- __LINE__,
- iiop_endpoint->host (),
- iiop_endpoint->port (),
- "errno"));
- }
- return -1;
- }
+
// Make the handler ready for use
svc_handler->make_idle ();
diff --git a/TAO/tao/IIOP_Endpoint.cpp b/TAO/tao/IIOP_Endpoint.cpp
index 9277fc2c88f..05961e61f7b 100644
--- a/TAO/tao/IIOP_Endpoint.cpp
+++ b/TAO/tao/IIOP_Endpoint.cpp
@@ -67,6 +67,7 @@ TAO_IIOP_Endpoint::TAO_IIOP_Endpoint (const char *host,
TAO_IIOP_Endpoint::~TAO_IIOP_Endpoint (void)
{
+
}
int
diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp
index c7f1e14b498..b0faecace8b 100644
--- a/TAO/tao/Pluggable.cpp
+++ b/TAO/tao/Pluggable.cpp
@@ -455,7 +455,7 @@ TAO_Connector::find_handler (TAO_Base_Connection_Property *prop,
int
TAO_Connector::add_handler (TAO_Base_Connection_Property *prop,
- TAO_Connection_Handler *handler)
+ TAO_Connection_Handler *handler)
{
// Compose the ExternId & Intid
TAO_Cache_ExtId ext_id (prop);