summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-04-25 13:26:05 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-04-25 13:26:05 +0000
commitf5f9452e409047ad75571007c1d452129e018589 (patch)
tree5eab02e5e9d0dedabd102d15f6e9bb0d828e01a7 /TAO
parent5dfb4ae4e537a34ae5c254332103abe356823e95 (diff)
downloadATCD-f5f9452e409047ad75571007c1d452129e018589.tar.gz
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog10
-rw-r--r--TAO/tao/Acceptor_Registry.cpp47
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp5
-rw-r--r--TAO/tao/ORB_Core.cpp22
-rw-r--r--TAO/tao/RTCORBA/Thread_Pool.cpp11
-rw-r--r--TAO/tao/Thread_Lane_Resources.cpp6
-rw-r--r--TAO/tao/params.cpp8
7 files changed, 45 insertions, 64 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 24f2249f0c7..6d316ec89f8 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,13 @@
+Fri Apr 25 13:24:32 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tao/Acceptor_Registry.cpp:
+ * tao/IIOP_Acceptor.cpp:
+ * tao/ORB_Core.cpp:
+ * tao/params.cpp:
+ * tao/RTCORBA/Thread_Pool.cpp:
+ * tao/Thread_Lane_Resources.cpp:
+ layout changes
+
Fri Apr 25 09:25:00 UTC 2008 Simon Massey <sma at pristmech dot com>
* examples/MFC/server.mpc:
diff --git a/TAO/tao/Acceptor_Registry.cpp b/TAO/tao/Acceptor_Registry.cpp
index be47e928550..37f5eb435ee 100644
--- a/TAO/tao/Acceptor_Registry.cpp
+++ b/TAO/tao/Acceptor_Registry.cpp
@@ -283,7 +283,7 @@ TAO_Acceptor_Registry::open (TAO_ORB_Core *orb_core,
// increment slot past the "://" (i.e. add 3)
ACE_CString addrs = iop.substring (slot + 3);
- const int result = this->open_i (orb_core,
+ int const result = this->open_i (orb_core,
reactor,
addrs,
factory,
@@ -438,7 +438,7 @@ int TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
addr.set (port, ACE_IPV6_ANY, AF_INET6); // IPv6 ANY on specified port
iiop_acceptor = dynamic_cast<TAO_IIOP_Acceptor*> (acceptor);
-
+
if (!iiop_acceptor)
return -1;
@@ -550,8 +550,7 @@ TAO_Acceptor_Registry::open_default (TAO_ORB_Core *orb_core,
// default endpoint.
// Make an acceptor
- TAO_Acceptor *acceptor =
- (*factory)->factory ()->make_acceptor ();
+ TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor ();
if (acceptor == 0)
{
@@ -588,11 +587,7 @@ TAO_Acceptor_Registry::open_default_i (TAO_ORB_Core *orb_core,
const char *options)
{
// Initialize the acceptor to listen on a default endpoint.
- if (acceptor->open_default (orb_core,
- reactor,
- major,
- minor,
- options) == -1)
+ if (acceptor->open_default (orb_core, reactor, major, minor, options) == -1)
{
delete acceptor;
@@ -601,8 +596,8 @@ TAO_Acceptor_Registry::open_default_i (TAO_ORB_Core *orb_core,
ACE_ERROR ((
LM_ERROR,
ACE_TEXT ("TAO (%P|%t) unable to open ")
- ACE_TEXT ("default acceptor for <%s>%p\n"),
- ACE_TEXT_CHAR_TO_TCHAR ((*factory)->protocol_name ().c_str ()),
+ ACE_TEXT ("default acceptor for <%C>%p\n"),
+ (*factory)->protocol_name ().c_str (),
ACE_TEXT ("")
));
}
@@ -622,14 +617,11 @@ TAO_Acceptor_Registry::close_all (void)
for (TAO_AcceptorSetIterator i = this->begin (); i != end; ++i)
{
- if (*i == 0)
+ if (*i != 0)
{
- continue;
+ (*i)->close ();
+ delete *i;
}
-
- (*i)->close ();
-
- delete *i;
}
this->size_ = 0;
@@ -685,21 +677,19 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
bool ignore_address)
{
ACE_CString options_tmp;
- this->extract_endpoint_options (addrs,
- options_tmp,
- (*factory)->factory ());
+ this->extract_endpoint_options (addrs, options_tmp, (*factory)->factory ());
const char *options = 0;
if (options_tmp.length () > 0)
- options = options_tmp.c_str ();
+ {
+ options = options_tmp.c_str ();
+ }
char *last_addr = 0;
ACE_Auto_Basic_Array_Ptr<char> addr_str (addrs.rep ());
- const char *astr = ACE_OS::strtok_r (addr_str.get (),
- ",",
- &last_addr);
+ const char *astr = ACE_OS::strtok_r (addr_str.get (), ",", &last_addr);
// Iterate over the addrs specified in the endpoint.
@@ -711,8 +701,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
// the specified protocol.
ACE_CString address (astr == 0 ? "" : astr);
- TAO_Acceptor *acceptor =
- (*factory)->factory ()->make_acceptor ();
+ TAO_Acceptor *acceptor = (*factory)->factory ()->make_acceptor ();
if (acceptor != 0)
{
@@ -720,9 +709,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
// exists.
int major = TAO_DEF_GIOP_MAJOR;
int minor = TAO_DEF_GIOP_MINOR;
- this->extract_endpoint_version (address,
- major,
- minor);
+ this->extract_endpoint_version (address, major, minor);
// Check for existence of endpoint.
if (ignore_address || address.length () == 0)
@@ -851,7 +838,7 @@ TAO_Acceptor_Registry::open_i (TAO_ORB_Core *orb_core,
{
/* Need to save the errno value from the acceptor->open(),
* because errno will get reset when we delete acceptor */
- const int errno_value = errno;
+ int const errno_value = errno;
delete acceptor;
if (TAO_debug_level > 0)
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index b812bd4ca77..c92980864dd 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -389,8 +389,7 @@ TAO_IIOP_Acceptor::open (TAO_ORB_Core *orb_core,
if (this->addrs_[0].set (addr) != 0)
return -1;
- return this->open_i (addr,
- reactor);
+ return this->open_i (addr, reactor);
}
int
@@ -465,7 +464,7 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr,
this->reuse_addr_) == -1)
{
if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
+ ACE_ERROR ((LM_ERROR,
ACE_TEXT ("TAO (%P|%t) - IIOP_Acceptor::open_i, ")
ACE_TEXT ("%p, "),
ACE_TEXT ("cannot open acceptor\n")));
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 0d986873e92..cf656c0030a 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -915,8 +915,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
// All endpoint strings should be of the above form(s).
this->set_endpoint_helper (TAO_DEFAULT_LANE,
- ACE_TEXT_ALWAYS_CHAR (current_arg)
- );
+ ACE_TEXT_ALWAYS_CHAR (current_arg));
arg_shifter.consume_arg ();
}
@@ -929,8 +928,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
// used.
this->set_endpoint_helper (TAO_DEFAULT_LANE,
- ACE_TEXT_ALWAYS_CHAR (current_arg)
- );
+ ACE_TEXT_ALWAYS_CHAR (current_arg));
arg_shifter.consume_arg ();
}
@@ -955,9 +953,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
(arg_shifter.get_current ()));
arg_shifter.consume_arg ();
- this->set_endpoint_helper (lane,
- endpoints
- );
+ this->set_endpoint_helper (lane, endpoints);
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
(ACE_TEXT("-ORBNoProprietaryActivation"))))
@@ -975,16 +971,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
else if (0 != (current_arg = arg_shifter.get_the_parameter
(ACE_TEXT("-ORBUseSharedProfile"))))
{
- this->orb_params ()->shared_profile
- (ACE_OS::atoi (current_arg));
+ this->orb_params ()->shared_profile (ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
(ACE_TEXT("-ORBNegotiateCodesets"))))
{
- negotiate_codesets =
- (ACE_OS::atoi (current_arg));
+ negotiate_codesets = (ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
@@ -1081,8 +1075,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
if (env_endpoint != 0)
{
int result =
- this->orb_params ()->add_endpoints (TAO_DEFAULT_LANE,
- env_endpoint);
+ this->orb_params ()->add_endpoints (TAO_DEFAULT_LANE, env_endpoint);
if (result != 0)
{
@@ -2575,8 +2568,7 @@ int
TAO_ORB_Core::set_endpoint_helper (const ACE_CString &lane,
const ACE_CString &endpoints)
{
- if (this->orb_params ()->add_endpoints (lane,
- endpoints) != 0)
+ if (this->orb_params ()->add_endpoints (lane, endpoints) != 0)
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t)\n")
diff --git a/TAO/tao/RTCORBA/Thread_Pool.cpp b/TAO/tao/RTCORBA/Thread_Pool.cpp
index 74305c0da70..5331338a540 100644
--- a/TAO/tao/RTCORBA/Thread_Pool.cpp
+++ b/TAO/tao/RTCORBA/Thread_Pool.cpp
@@ -298,7 +298,7 @@ TAO_Thread_Lane::open (void)
this->pool ().manager ().orb_core ().orb_params ();
TAO_EndpointSet endpoint_set;
- bool ignore_address;
+ bool ignore_address = false;
// Get the endpoints for this lane.
params->get_endpoint_set (pool_lane_id, endpoint_set);
@@ -308,14 +308,13 @@ TAO_Thread_Lane::open (void)
// If endpoints are not specified for this lane, use the
// endpoints specified for the default lane but ignore their
// addresses.
- params->get_endpoint_set (TAO_DEFAULT_LANE,
- endpoint_set);
+ params->get_endpoint_set (TAO_DEFAULT_LANE, endpoint_set);
ignore_address = true;
}
else
{
- // If endpoints are specified for this lane, use them with thier
+ // If endpoints are specified for this lane, use them with their
// addresses.
ignore_address = false;
}
@@ -779,9 +778,7 @@ TAO_Thread_Pool_Manager::destroy_threadpool (RTCORBA::ThreadpoolId threadpool)
TAO_THREAD_POOL_MANAGER_GUARD;
// Unbind the thread pool from the map.
- int result =
- this->thread_pools_.unbind (threadpool,
- tao_thread_pool);
+ int const result = this->thread_pools_.unbind (threadpool, tao_thread_pool);
// If the thread pool is not found in our map.
if (result != 0)
diff --git a/TAO/tao/Thread_Lane_Resources.cpp b/TAO/tao/Thread_Lane_Resources.cpp
index 6552de0463d..7aaef3345e7 100644
--- a/TAO/tao/Thread_Lane_Resources.cpp
+++ b/TAO/tao/Thread_Lane_Resources.cpp
@@ -343,8 +343,7 @@ TAO_Thread_Lane_Resources::ami_response_handler_allocator (void)
int
TAO_Thread_Lane_Resources::open_acceptor_registry (const TAO_EndpointSet &endpoint_set,
- bool ignore_address
- )
+ bool ignore_address)
{
// Access the acceptor registry.
TAO_Acceptor_Registry &ar = this->acceptor_registry ();
@@ -353,8 +352,7 @@ TAO_Thread_Lane_Resources::open_acceptor_registry (const TAO_EndpointSet &endpoi
int result = ar.open (&this->orb_core_,
this->leader_follower ().reactor (),
endpoint_set,
- ignore_address
- );
+ ignore_address);
return result;
}
diff --git a/TAO/tao/params.cpp b/TAO/tao/params.cpp
index d88c45ce87c..7c09ab963ca 100644
--- a/TAO/tao/params.cpp
+++ b/TAO/tao/params.cpp
@@ -75,15 +75,14 @@ TAO_ORB_Parameters::get_endpoint_set (const ACE_CString &lane,
endpoints_map_type::iterator const endpoints =
this->endpoints_map_.find (lane);
- // If lane is not in the map, <endpoint_set> remains empty
+ // If lane is not in the map, endpoint_set remains empty
if (endpoints == this->endpoints_map_.end ())
return;
// At this point, the parsing should not fail since they have been
// parsed successfully before.
int const result =
- this->parse_and_add_endpoints ((*endpoints).second,
- endpoint_set);
+ this->parse_and_add_endpoints ((*endpoints).second, endpoint_set);
ACE_ASSERT (result == 0);
ACE_UNUSED_ARG (result);
@@ -97,8 +96,7 @@ TAO_ORB_Parameters::add_endpoints (const ACE_CString &lane,
// Parse the additional endpoints.
int const result =
- this->parse_and_add_endpoints (additional_endpoints,
- endpoint_set);
+ this->parse_and_add_endpoints (additional_endpoints, endpoint_set);
// Parse failure.
if (result != 0)