summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2003-01-11 00:36:21 +0000
committerbala <balanatarajan@users.noreply.github.com>2003-01-11 00:36:21 +0000
commit878468f4fc0ba6e08c975af53bc320df875e7daa (patch)
tree48a6b0862340daa73b1b0843fcc053627059a360
parent3aa4d15d793f6cbc8be9a5ac84e38852d416bfa1 (diff)
downloadATCD-878468f4fc0ba6e08c975af53bc320df875e7daa.tar.gz
ChangeLogTag: Fri Jan 10 19:36:56 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
-rw-r--r--TAO/ChangeLog34
-rw-r--r--TAO/tao/Transport_Cache_Manager.cpp84
-rw-r--r--TAO/tao/Transport_Cache_Manager.h6
3 files changed, 40 insertions, 84 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index dbd2191acfe..14d49904024 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,25 +1,37 @@
+Fri Jan 10 19:36:56 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
+
+ * tao/Transport_Cache_Manager.h:
+ * tao/Transport_Cache_Manager.cpp: Added a debug
+ statement. Removed the method close_entries () which was under
+ #if 0 guard.
+
+ The method is_entry_idle () was trying to make the transport as
+ busy, which is horribly horribly bad. The method is_entry_idle
+ () should only do one thing, ie. check whether the entry is idle
+ or not!
+
Fri Jan 10 08:28:34 2003 Frank Hunleth <frank@hunleth.com>
* orbsvcs/orbsvcs/PortableGroup/UIPMC_Connection_Handler.cpp:
- Removed call to unsubscribe from multicast socket as this happens
- automatically. Thanks to Don Hinton <dhinton@ieee.org> for
- pointing this out.
+ Removed call to unsubscribe from multicast socket as this happens
+ automatically. Thanks to Don Hinton <dhinton@ieee.org> for
+ pointing this out.
* orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp:
* orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h:
- Added code to check length of MIOP UniqueID so that it can be
- properly parsed. Thanks to Chau Vincent
- <Vincent.Chau@fr.thalesgroup.com> for finding the problem when
- performing MIOP interoperability testing. Also, added code to
- set the UniqueID and packet length fields properly per update to
- the MIOP spec and tightened bounds checks on MIOP packets to
- prevent buffer overruns.
+ Added code to check length of MIOP UniqueID so that it can be
+ properly parsed. Thanks to Chau Vincent
+ <Vincent.Chau@fr.thalesgroup.com> for finding the problem when
+ performing MIOP interoperability testing. Also, added code to
+ set the UniqueID and packet length fields properly per update to
+ the MIOP spec and tightened bounds checks on MIOP packets to
+ prevent buffer overruns.
* orbsvcs/tests/Miop/McastHello/client.cpp:
- Fixed spelling error.
+ Fixed spelling error.
Thu Jan 9 11:01:24 2003 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp
index 6f5f3d9ad77..def8b7c6964 100644
--- a/TAO/tao/Transport_Cache_Manager.cpp
+++ b/TAO/tao/Transport_Cache_Manager.cpp
@@ -137,6 +137,13 @@ TAO_Transport_Cache_Manager::bind_i (TAO_Cache_ExtId &ext_id,
"TAO (%P|%t) - Transport_Cache_Manager::bind_i, "
"unable to bind\n"));
}
+ else if (TAO_debug_level > 3)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Transport_Cache_Manager::bind_i, "
+ " size is [%d] \n",
+ this->current_size ()));
+ }
return retval;
}
@@ -216,9 +223,6 @@ TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key,
{
CORBA::Boolean idle =
this->is_entry_idle (entry);
- if (entry == 0)
- return -1;
-
if (idle)
{
@@ -229,6 +233,8 @@ TAO_Transport_Cache_Manager::find_i (const TAO_Cache_ExtId &key,
// TAO_Transport objects.
value = entry->int_id_;
+ entry->int_id_.recycle_state (ACE_RECYCLABLE_BUSY);
+
if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
@@ -418,15 +424,7 @@ TAO_Transport_Cache_Manager::is_entry_idle (HASH_MAP_ENTRY *&entry)
}
if (entry->int_id_.recycle_state () == ACE_RECYCLABLE_IDLE_AND_PURGABLE ||
entry->int_id_.recycle_state () == ACE_RECYCLABLE_IDLE_BUT_NOT_PURGABLE)
- {
- // Save that in the transport
- entry->int_id_.transport ()->cache_map_entry (entry);
-
- // Mark the connection as busy
- entry->int_id_.recycle_state (ACE_RECYCLABLE_BUSY);
-
- return 1;
- }
+ return 1;
return 0;
}
@@ -473,10 +471,11 @@ TAO_Transport_Cache_Manager::purge (void)
if (TAO_debug_level > 0)
{
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - ")
- ACE_TEXT ("Purging %d of %d cache entries\n"),
- amount,
- sorted_size));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::purge, ")
+ ACE_TEXT ("purging %d of %d cache entries\n"),
+ amount,
+ sorted_size));
}
int count = 0;
@@ -484,6 +483,8 @@ TAO_Transport_Cache_Manager::purge (void)
{
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)
{
@@ -607,57 +608,6 @@ TAO_Transport_Cache_Manager::fill_set_i (DESCRIPTOR_SET& sorted_set)
}
-#if 0
-void
-TAO_Transport_Cache_Manager::close_entries (DESCRIPTOR_SET& sorted_set,
- int sorted_size)
-{
- // Calculate the number of entries to purge
- const int amount = (sorted_size * this->percent_) / 100;
-
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Transport_Cache_Manager::close_entries, "
- "purging %d of %d cache entries\n",
- amount, sorted_size));
- }
-
- int count = 0;
- for(int i = 0; count < amount && i < sorted_size; i++)
- {
- if (this->is_entry_idle(sorted_set[i]))
- {
- TAO_Transport* transport = sorted_set[i]->int_id_.transport ();
- if (TAO_debug_level > 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Transport_Cache_Manager::close_entries, "
- "found idle transport in cache: "
- "0x%x Transport[%d]\n",
- transport, 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_i().
- 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);
- transport->close_connection_no_purge ();
-
- // Count this as a successful purged entry
- count++;
- }
- }
-
- delete [] sorted_set;
- sorted_set = 0;
-}
-#endif
-
int
TAO_Transport_Cache_Manager::wait_for_connection (TAO_Cache_ExtId &extid)
{
diff --git a/TAO/tao/Transport_Cache_Manager.h b/TAO/tao/Transport_Cache_Manager.h
index 53d3fecb999..37823f42fc2 100644
--- a/TAO/tao/Transport_Cache_Manager.h
+++ b/TAO/tao/Transport_Cache_Manager.h
@@ -210,12 +210,6 @@ private:
/// a sorted order.
int fill_set_i (DESCRIPTOR_SET& sorted_set);
-#if 0
- /// Look through the sorted set and close the connection on
- /// the required number of items in the set.
- void close_entries (DESCRIPTOR_SET& sorted_set, int size);
-#endif
-
/// Wait for connections if we have reached the limit on the number
/// of muxed connections. If not (ie. if we dont use a muxed
/// connection or if we have not reached the limit) this just