diff options
author | mjb2 <mjb2@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-30 20:44:39 +0000 |
---|---|---|
committer | mjb2 <mjb2@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-30 20:44:39 +0000 |
commit | dc2d89234e580e4fc4f8761fbc4cfb248867dadd (patch) | |
tree | 4bd552dcab47f8fdda70d4ba36d020f7e217542d | |
parent | 5526ed9b6938ffec789bf66f0b4f61dfb3fd7a6d (diff) | |
download | ATCD-dc2d89234e580e4fc4f8761fbc4cfb248867dadd.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp | 19 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp | 29 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp | 14 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 25 |
4 files changed, 51 insertions, 36 deletions
diff --git a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp index e7124551926..07477e49892 100644 --- a/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp +++ b/TAO/orbsvcs/orbsvcs/IOR_Multicast.cpp @@ -75,7 +75,8 @@ TAO_IOR_Multicast::handle_input (ACE_HANDLE) if (retcode == -1) return -1; - ACE_DEBUG ((LM_DEBUG, "(%P|%t) Received multicast.\n")); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Received multicast.\n")); // @@ validate data string received is from a valid client here // @@ Probably not needed @@ -101,14 +102,14 @@ TAO_IOR_Multicast::handle_input (ACE_HANDLE) ACE_OS::strlen (this->ior_) + 1, remote_addr, 0); - - ACE_DEBUG ((LM_DEBUG, - "(%P|%t) ior_: <%s>\n" - " sent through port %u.\n" - "retcode=%d\n", - this->ior_, - remote_addr.get_port_number (), - retcode)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) ior_: <%s>\n" + " sent through port %u.\n" + "retcode=%d\n", + this->ior_, + remote_addr.get_port_number (), + retcode)); if (retcode == -1) return -1; diff --git a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp index c4ac5920127..dd2f4903e2d 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.cpp @@ -151,10 +151,11 @@ NS_NamingContext::bind (const CosNaming::Name& n, return; } - ACE_DEBUG ((LM_DEBUG, - "bound: <%s,%s>\n", - n[0].id.in () == 0? "nil" : n[0].id.in (), - n[0].kind.in () == 0? "nil" : n[0].kind.in () )); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "bound: <%s,%s>\n", + n[0].id.in () == 0? "nil" : n[0].id.in (), + n[0].kind.in () == 0? "nil" : n[0].kind.in () )); } } @@ -360,10 +361,11 @@ NS_NamingContext::resolve (const CosNaming::Name& n, return CORBA::Object::_nil (); } - ACE_DEBUG ((LM_DEBUG, - "Trying to resolve <%s,%s>\n", - n[0].id.in () == 0? "nil" : n[0].id.in (), - n[0].kind.in () == 0? "nil" : n[0].kind.in ())); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Trying to resolve <%s,%s>\n", + n[0].id.in () == 0? "nil" : n[0].id.in (), + n[0].kind.in () == 0? "nil" : n[0].kind.in ())); // Resolve the first component of the name. NS_ExtId name (n[0].id, n[0].kind); @@ -406,11 +408,12 @@ NS_NamingContext::resolve (const CosNaming::Name& n, return cont->resolve (rest_of_name, _env); } - ACE_DEBUG ((LM_DEBUG, - "Resolved <%s,%s> to %08.8x\n", - n[0].id.in () == 0? "nil" : n[0].id.in (), - n[0].kind.in () == 0? "nil" : n[0].kind.in (), - item)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "Resolved <%s,%s> to %08.8x\n", + n[0].id.in () == 0? "nil" : n[0].id.in (), + n[0].kind.in () == 0? "nil" : n[0].kind.in (), + item)); // If the name we had to resolve was simple, we just need to return // the result. diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp index 4489e305353..2ebb4b9e77c 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp @@ -116,6 +116,7 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, TAO_TRY_ENV); TAO_CHECK_ENV; + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "NameService IOR is <%s>\n", this->naming_service_ior_.in ())); @@ -155,11 +156,17 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, // Register event handler for the ior multicast. if (reactor->register_handler (this->ior_multicast_, ACE_Event_Handler::READ_MASK) == -1) - ACE_DEBUG ((LM_DEBUG, - "cannot register Event handler\n")); + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "cannot register Event handler\n")); + } else - ACE_DEBUG ((LM_DEBUG, + { + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "The multicast server setup is done.\n")); + } #endif /* ACE_HAS_IP_MULTICAST */ } else @@ -210,6 +217,7 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb, TAO_TRY_ENV); TAO_CHECK_ENV; + if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "NameService IOR is <%s>\n", this->naming_service_ior_.in ())); diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 5431aa8115f..d777e870483 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -531,17 +531,19 @@ CORBA_ORB::multicast_to_service (TAO_Service_ID service_id, ssize_t n_bytes = multicast.send (&mcast_info, sizeof (mcast_info)); - ACE_DEBUG ((LM_DEBUG, "sent multicast request.")); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, "sent multicast request.")); // check for errors if (n_bytes == -1) return return_value; - - ACE_DEBUG ((LM_DEBUG, - "%s; Sent multicast. Reply port is %u. # of bytes sent is %d.\n", - __FILE__, - response_addr.get_port_number (), - n_bytes)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "%s; Sent multicast. Reply port is %u." + "# of bytes sent is %d.\n", + __FILE__, + response_addr.get_port_number (), + n_bytes)); // Wait for response until TAO_DEFAULT_NAME_SERVER_TIMEOUT. @@ -561,10 +563,11 @@ CORBA_ORB::multicast_to_service (TAO_Service_ID service_id, // null terminate message buf[n_bytes] = 0; - ACE_DEBUG ((LM_DEBUG, - "%s; Service resolved to ior: '%s'\n", - __FILE__, - buf)); + if (TAO_debug_level > 0) + ACE_DEBUG ((LM_DEBUG, + "%s; Service resolved to ior: '%s'\n", + __FILE__, + buf)); // convert ior to an object reference CORBA_Object_ptr objectified_ior = |