summaryrefslogtreecommitdiff
path: root/TAO/tao/Transport_Cache_Manager.cpp
diff options
context:
space:
mode:
authorjeliazkov_i <jeliazkov_i@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-05-18 18:06:48 +0000
committerjeliazkov_i <jeliazkov_i@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-05-18 18:06:48 +0000
commit2c79b94827f5aacec8a1aef05e88152cbb5098c5 (patch)
tree3912a3cd5cf1064803cffead8eec8ff417267c38 /TAO/tao/Transport_Cache_Manager.cpp
parent8952f2772d760737538f99c59be8875fce1bb738 (diff)
downloadATCD-2c79b94827f5aacec8a1aef05e88152cbb5098c5.tar.gz
Wed May 18 13:05:48 2005 Iliyan Jeliazkov <jeliazkov_i@ociweb.com>
Diffstat (limited to 'TAO/tao/Transport_Cache_Manager.cpp')
-rw-r--r--TAO/tao/Transport_Cache_Manager.cpp64
1 files changed, 17 insertions, 47 deletions
diff --git a/TAO/tao/Transport_Cache_Manager.cpp b/TAO/tao/Transport_Cache_Manager.cpp
index 2998508e7aa..09e994f7ce1 100644
--- a/TAO/tao/Transport_Cache_Manager.cpp
+++ b/TAO/tao/Transport_Cache_Manager.cpp
@@ -1,7 +1,6 @@
//$Id$
#include "tao/Transport_Cache_Manager.h"
#include "tao/Transport.h"
-#include "tao/Endpoint.h"
#include "tao/debug.h"
#include "tao/ORB_Core.h"
#include "tao/Connection_Purging_Strategy.h"
@@ -84,22 +83,15 @@ namespace TAO
Transport_Cache_Manager::bind_i (Cache_ExtId &ext_id,
Cache_IntId &int_id)
{
- if (TAO_debug_level > 4)
- {
- char address [ACE_UNIQUE_NAME_LEN+1];
- if (ext_id.property ()->endpoint ()->addr_to_string (address,
- sizeof address) == -1)
- ACE_OS::strncpy (address, "*UNRESOLVED*", sizeof address);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::bind_i ")
- ACE_TEXT ("<%s> (%@,hash=0x%x) -> Transport[%d] (%@)\n"),
- address,
- ext_id.property (),
- ext_id.hash (),
- int_id.transport ()->id (),
- int_id.transport ()));
- }
+ if (TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - Transport_Cache_Manager::bind_i, "
+ "0x%x -> 0x%x Transport[%d]\n",
+ ext_id.property (),
+ int_id.transport (),
+ int_id.transport ()->id ()));
+ }
// Get the entry too
HASH_MAP_ENTRY *entry = 0;
@@ -119,10 +111,10 @@ namespace TAO
}
else if (retval == 1)
{
- if (TAO_debug_level > 4 && retval != 0)
+ if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Transport_Cache_Manager::bind_i, "
+ "TAO (%P|%t) - Transport_Cache_Manager::bind_i, "
"unable to bind in the first attempt. "
"Trying with a new index\n"));
}
@@ -140,7 +132,7 @@ namespace TAO
if (TAO_debug_level > 5 && retval != 0)
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"TAO (%P|%t) - Transport_Cache_Manager::bind_i "
"failed\n"));
}
@@ -214,21 +206,6 @@ namespace TAO
// Make a temporary object. It does not do a copy.
Cache_ExtId tmp_key (key.property ());
- if (TAO_debug_level > 4)
- {
- char address [ACE_UNIQUE_NAME_LEN+1];
- if (tmp_key.property ()->endpoint ()->addr_to_string (address,
- sizeof address) == -1)
- ACE_OS::strncpy (address, "*UNRESOLVED*", sizeof address);
-
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::find_i, ")
- ACE_TEXT ("looking for <%s> (%@, hash=0x%x)\n"),
- address,
- tmp_key.property (),
- tmp_key.hash ()));
- }
-
while (retval == 0)
{
// Wait for a connection..
@@ -238,13 +215,6 @@ namespace TAO
retval = this->cache_map_.find (tmp_key,
entry);
- if (TAO_debug_level > 4 && retval != 0)
- {
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::find_i, ")
- ACE_TEXT ("cache miss!\n")));
- }
-
// We have an entry in the map, check whether it is idle.
if (entry)
{
@@ -265,8 +235,8 @@ namespace TAO
if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::find_i, ")
- ACE_TEXT ("at index %d, Transport[%d] (idle)\n"),
+ "TAO (%P|%t) - Transport_Cache_Manager::find_i, "
+ "at index %d (Transport[%d]) - idle\n",
entry->ext_id_.index (),
entry->int_id_.transport ()->id ()));
}
@@ -276,8 +246,8 @@ namespace TAO
else if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Transport_Cache_Manager::find_i, ")
- ACE_TEXT ("at index %d, Transport[%d] is not idle\n"),
+ "TAO (%P|%t) - Transport_Cache_Manager::find_i, "
+ "at index %d (Transport[%d]) - not idle\n",
entry->ext_id_.index (),
entry->int_id_.transport ()->id ()));
}
@@ -290,7 +260,7 @@ namespace TAO
// If we are here then it is an error
if (TAO_debug_level > 4 && retval != 0)
{
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
"TAO (%P|%t) - Transport_Cache_Manager::find_i, "
"no idle transport is available\n"));
}