summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstanleyk <stanleyk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-21 22:59:17 +0000
committerstanleyk <stanleyk@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-01-21 22:59:17 +0000
commit5bc347d10ad91bbcb397181d1c414bd6c11aa62e (patch)
tree8a70ec6be909bd620869585b97e1dc0186198dd6
parent86cea02a072fd20a4900bdad132a635fd7f72ef9 (diff)
downloadATCD-5bc347d10ad91bbcb397181d1c414bd6c11aa62e.tar.gz
Fixed bug when accessing an object reference that is a nil object.
Added more fixes to conform with ACE Coding Guidelines for merge.
-rw-r--r--TAO/OCI_RE_ChangeLog56
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp119
-rw-r--r--TAO/tao/CSD_Framework/CSD_Framework_Loader.cpp9
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp4
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp3
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_ThreadPool.cpp6
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Config.cpp89
-rw-r--r--TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp19
-rw-r--r--TAO/tao/Dynamic_TP/DTP_ORB_Loader.cpp2
-rw-r--r--TAO/tao/Dynamic_TP/DTP_POA_Loader.cpp15
-rw-r--r--TAO/tao/Dynamic_TP/DTP_POA_Loader.h2
-rw-r--r--TAO/tao/Dynamic_TP/DTP_POA_Strategy.cpp219
-rw-r--r--TAO/tao/Dynamic_TP/DTP_POA_Strategy.inl16
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Task.cpp122
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp12
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h9
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp11
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Thread_Pool.h3
-rw-r--r--TAO/tao/ImR_Client/ImR_Client.cpp191
-rw-r--r--TAO/tao/Invocation_Adapter.cpp2
-rw-r--r--TAO/tao/Invocation_Retry_State.cpp24
-rw-r--r--TAO/tao/ORB_Core.cpp25
-rw-r--r--TAO/tao/PortableServer/LifespanStrategy.h8
-rw-r--r--TAO/tao/PortableServer/LifespanStrategyPersistent.cpp10
-rw-r--r--TAO/tao/PortableServer/LifespanStrategyTransient.cpp4
-rw-r--r--TAO/tao/PortableServer/LifespanStrategyTransient.h4
-rw-r--r--TAO/tao/PortableServer/Root_POA.cpp4
-rw-r--r--TAO/tao/Stub.cpp15
-rw-r--r--TAO/tao/Stub.inl14
-rw-r--r--TAO/tao/Synch_Invocation.cpp67
-rw-r--r--TAO/tao/default_client.cpp86
-rw-r--r--TAO/utils/logWalker/GIOP_Buffer.cpp24
-rw-r--r--TAO/utils/logWalker/GIOP_Buffer.h5
-rw-r--r--TAO/utils/nsgroup/nsgroup.cpp190
-rwxr-xr-xTAO/utils/nsgroup/run_test.pl7
36 files changed, 826 insertions, 574 deletions
diff --git a/TAO/OCI_RE_ChangeLog b/TAO/OCI_RE_ChangeLog
index fc9a7dcbae5..9f28d43a047 100644
--- a/TAO/OCI_RE_ChangeLog
+++ b/TAO/OCI_RE_ChangeLog
@@ -1,3 +1,59 @@
+Mon Jan 21 22:52:17 UTC 2013 Kevin Stanley <stanleyk@ociweb.com>
+
+ * orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp:
+
+ Added check for nil object prior to querying if it is a group.
+
+ * utils/nsgroup/run_test.pl:
+
+ Added tests to expose the issue with nil objects in naming service.
+
+ * orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp:
+
+ * tao/CSD_Framework/CSD_Framework_Loader.cpp:
+
+ * tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp:
+ * tao/CSD_ThreadPool/CSD_TP_Task.cpp:
+ * tao/CSD_ThreadPool/CSD_ThreadPool.cpp:
+
+ * tao/Dynamic_TP/DTP_Config.cpp:
+ * tao/Dynamic_TP/DTP_ORBInitializer.cpp:
+ * tao/Dynamic_TP/DTP_ORB_Loader.cpp:
+ * tao/Dynamic_TP/DTP_POA_Loader.h:
+ * tao/Dynamic_TP/DTP_POA_Loader.cpp:
+ * tao/Dynamic_TP/DTP_POA_Strategy.inl:
+ * tao/Dynamic_TP/DTP_POA_Strategy.cpp:
+ * tao/Dynamic_TP/DTP_Task.cpp:
+ * tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h:
+ * tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp:
+ * tao/Dynamic_TP/DTP_Thread_Pool.h:
+ * tao/Dynamic_TP/DTP_Thread_Pool.cpp:
+
+ * tao/ImR_Client/ImR_Client.cpp:
+
+ * tao/Invocation_Adapter.cpp:
+ * tao/Invocation_Retry_State.cpp:
+ * tao/ORB_Core.cpp:
+
+ * tao/PortableServer/LifespanStrategy.h:
+ * tao/PortableServer/LifespanStrategyPersistent.cpp:
+ * tao/PortableServer/LifespanStrategyTransient.h:
+ * tao/PortableServer/LifespanStrategyTransient.cpp:
+ * tao/PortableServer/Root_POA.cpp:
+
+ * tao/Stub.inl:
+ * tao/Stub.cpp:
+ * tao/Synch_Invocation.cpp:
+ * tao/default_client.cpp:
+
+ * utils/logWalker/GIOP_Buffer.h:
+ * utils/logWalker/GIOP_Buffer.cpp:
+
+ * utils/nsgroup/nsgroup.cpp:
+
+ Additional updates to conform with ACE Development Guidelines
+ in preparation for merge.
+
Mon Jan 21 21:43:20 UTC 2013 Phillip LaBanca <labancap@ociweb.com>
* orbsvcs/orbsvcs/Naming/Persistent_Context_Index.h:
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp
index 90e14d99936..534f4a45343 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/FT_Storable_Naming_Context.cpp
@@ -42,6 +42,10 @@ TAO_FT_Storable_Naming_Context::~TAO_FT_Storable_Naming_Context (void)
CORBA::Boolean
TAO_FT_Storable_Naming_Context::is_object_group (CORBA::Object_ptr obj) const
{
+ // Ensure the object is not nil first. If so, it cannot be an ObjectGroup.
+ if (CORBA::is_nil (obj))
+ return 0;
+
// If there is a tagged component with tag = IOP::TAG_FT_GROUP in the
// object reference then it is an object group
PortableGroup::TagGroupTaggedComponent tagged_component;
diff --git a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp
index 54ca5053032..bc134bd8626 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/FaultTolerant/nsgroup_svc.cpp
@@ -21,9 +21,11 @@ NS_group_svc::NS_group_svc (void)
FT_Naming::LoadBalancingStrategyValue
NS_group_svc::determine_policy_string (const ACE_TCHAR *policy)
{
- if (ACE_OS::strcasecmp (policy, ACE_TEXT ("rand")) == 0) {
+ if (ACE_OS::strcasecmp (policy,
+ ACE_TEXT_ALWAYS_CHAR ("rand")) == 0) {
return FT_Naming::RANDOM;
- } else if (ACE_OS::strcasecmp (policy, ACE_TEXT ("least")) == 0){
+ } else if (ACE_OS::strcasecmp (policy,
+ ACE_TEXT_ALWAYS_CHAR ("least")) == 0) {
return FT_Naming::LEAST;
} else {
return FT_Naming::ROUND_ROBIN; // Default case
@@ -38,9 +40,9 @@ NS_group_svc::set_orb( CORBA::ORB_ptr orb)
if (CORBA::is_nil (this->orb_))
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT (" (%P|%t) Unable to initialize the ")
- ACE_TEXT ("ORB.\n")),
- -1);
+ ACE_TEXT (" (%P|%t) Unable to initialize the ")
+ ACE_TEXT ("ORB.\n")),
+ -1);
return 0;
}
@@ -53,7 +55,7 @@ NS_group_svc::set_naming_manager( FT_Naming::NamingManager_ptr nm)
if (CORBA::is_nil (this->naming_manager_))
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT (" (%P|%t) Invalid Naming Manager.\n")),
- -1);
+ -1);
return 0;
}
@@ -66,7 +68,7 @@ NS_group_svc::set_name_context( CosNaming::NamingContextExt_ptr nc)
if (CORBA::is_nil (this->name_service_))
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT (" (%P|%t) Invalid Name Context.\n")),
- -1);
+ -1);
return 0;
}
@@ -83,7 +85,7 @@ NS_group_svc::group_exist (
}
try
- {
+ {
PortableGroup::ObjectGroup_var group_var =
this->naming_manager_->get_object_group_ref_from_name (group_name);
}
@@ -96,9 +98,10 @@ NS_group_svc::group_exist (
}
/**
- * The naming service shall provide a command line utility for creating object groups.
- * Adds the object group to to the load balancing service with the specified
- * selection policy. On Creation, an object group contains no member objects.
+ * The naming service shall provide a command line utility for creating
+ * object groups. Adds the object group to to the load balancing service
+ * with the specified selection policy. On Creation, an object group
+ * contains no member objects.
*/
int
@@ -112,7 +115,6 @@ NS_group_svc::group_create (
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("group_create args not provided\n")),
-2);
-
}
try
@@ -120,7 +122,7 @@ NS_group_svc::group_create (
/// Verify that the group does not already exist
/// Group names must be unique
- if ( true == group_exist (group_name))
+ if ( true == group_exist (ACE_TEXT_ALWAYS_CHAR (group_name)))
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("Group %C already exists\n"),
@@ -135,22 +137,23 @@ NS_group_svc::group_create (
property.nam.length (1);
property.nam[0].id = CORBA::string_dup (
- ACE_TEXT ("org.omg.PortableGroup.MembershipStyle"));
+ ACE_TEXT_ALWAYS_CHAR ("org.omg.PortableGroup.MembershipStyle"));
PortableGroup::MembershipStyleValue msv = PortableGroup::MEMB_APP_CTRL;
property.val <<= msv;
CORBA::Object_var obj =
- this->naming_manager_->create_object_group (group_name,
- determine_policy_string(policy),
- criteria);
+ this->naming_manager_->create_object_group (
+ ACE_TEXT_ALWAYS_CHAR (group_name),
+ determine_policy_string(ACE_TEXT_ALWAYS_CHAR (policy)),
+ criteria);
if (CORBA::is_nil (obj.in ()))
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to create group %C.\n"),
group_name),
- -1);
+ -1);
}
}
@@ -190,7 +193,7 @@ NS_group_svc::group_bind (
PortableGroup::ObjectGroup_var group_var =
this->naming_manager_->get_object_group_ref_from_name (
- ACE_TEXT_ALWAYS_CHAR( group_name));
+ ACE_TEXT_ALWAYS_CHAR(group_name));
if (CORBA::is_nil (group_var.in()))
ACE_ERROR_RETURN ((LM_ERROR,
@@ -200,49 +203,46 @@ NS_group_svc::group_bind (
CORBA::String_var str = CORBA::string_dup( ACE_TEXT_ALWAYS_CHAR (path) );
CosNaming::Name_var name = this->name_service_->to_name ( str.in() );
- this->name_service_->rebind ( name.in(), group_var.in() );
+ this->name_service_->rebind (name.in(), group_var.in());
}
catch (const CosNaming::NamingContextExt::InvalidName& ex){
- ex._tao_print_exception (
- ACE_TEXT ("InvalidName Exception in group_bind"));
+ ex._tao_print_exception ("InvalidName Exception in group_bind");
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\n%C is invalid\n"),
path),
- -1);
+ -1);
}
catch (const CosNaming::NamingContext::CannotProceed&){
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\nCannot proceed with %C\n"),
- path),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("\nCannot proceed with %C\n"),
+ path),
+ -1);
}
catch (const CosNaming::NamingContext::NotFound&){
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to find %C\n"),
path),
- -1);
+ -1);
}
catch (const CORBA::SystemException& ex){
- ex._tao_print_exception (
- ACE_TEXT ("SystemException Exception in group_bind"));
+ ex._tao_print_exception ("SystemException Exception in group_bind");
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\nUnable to bind %C\n"),
- path),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("\nUnable to bind %C\n"),
+ path),
+ -1);
}
catch (const CORBA::Exception& ex){
- ex._tao_print_exception (
- ACE_TEXT ("Exception in group_bind"));
+ ex._tao_print_exception ("Exception in group_bind");
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("\nUnable to bind %C\n"),
- path),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("\nUnable to bind %C\n"),
+ path),
+ -1);
}
return 0;
}
@@ -253,22 +253,22 @@ NS_group_svc::group_unbind (const ACE_TCHAR* path){
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("group_unbind args not provided\n")),
- -2);
+ -2);
}
try
- {
+ {
- CORBA::String_var str = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (path));
- CosNaming::Name_var name = this->name_service_->to_name ( str.in() );
- this->name_service_->unbind ( name.in() );
+ CORBA::String_var str = CORBA::string_dup (ACE_TEXT_ALWAYS_CHAR (path));
+ CosNaming::Name_var name = this->name_service_->to_name ( str.in() );
+ this->name_service_->unbind (name.in());
}
catch (const CosNaming::NamingContext::NotFound&){
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to find %C\n"),
path),
- -1);
+ -1);
}
catch (const CosNaming::NamingContext::CannotProceed&){
ACE_ERROR_RETURN ((LM_ERROR,
@@ -276,26 +276,24 @@ NS_group_svc::group_unbind (const ACE_TCHAR* path){
path),
-1);
}
- catch (const CosNaming::NamingContext::InvalidName&){
+ catch (const CosNaming::NamingContext::InvalidName&) {
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\n%C is invalid\n"),
path),
-1);
}
- catch (const CORBA::SystemException& ex){
+ catch (const CORBA::SystemException& ex) {
- ex._tao_print_exception (
- ACE_TEXT ("Exception in group_unbind"));
+ ex._tao_print_exception ("Exception in group_unbind");
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to unbind %C\n"),
path),
-1);
}
- catch (const CORBA::Exception& ex){
+ catch (const CORBA::Exception& ex) {
- ex._tao_print_exception (
- ACE_TEXT ("Exception in group_unbind"));
+ ex._tao_print_exception ("Exception in group_unbind");
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to unbind %C\n"),
@@ -380,13 +378,12 @@ NS_group_svc::display_load_policy_group(
}
catch (const CORBA::Exception& ex)
{
- ex._tao_print_exception (
- ACE_TEXT ("Exception in group_list"));
+ ex._tao_print_exception ("Exception in group_list");
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to get %C group list\n"),
- display_label),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Unable to get %C group list\n"),
+ display_label),
+ -1);
}
return 0;
}
@@ -466,7 +463,7 @@ NS_group_svc::group_remove (const ACE_TCHAR* group_name)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("\nUnable to remove group %C\n"),
group_name),
- -1);
+ -1);
}
return 0;
@@ -690,7 +687,7 @@ NS_group_svc::member_show (
this->naming_manager_->get_member_ref (group_var.in(), location_name);
CORBA::String_var ior_string =
- this->orb_->object_to_string( ior_var.in() );
+ this->orb_->object_to_string (ior_var.in());
std::cout << ior_string.in() << std::endl;
}
diff --git a/TAO/tao/CSD_Framework/CSD_Framework_Loader.cpp b/TAO/tao/CSD_Framework/CSD_Framework_Loader.cpp
index 46e6b8d1d65..5f9e5e65791 100644
--- a/TAO/tao/CSD_Framework/CSD_Framework_Loader.cpp
+++ b/TAO/tao/CSD_Framework/CSD_Framework_Loader.cpp
@@ -20,9 +20,12 @@ TAO_CSD_Framework_Loader::~TAO_CSD_Framework_Loader (void)
int
TAO_CSD_Framework_Loader::static_init (void)
{
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_CSD_Object_Adapter_Factory);
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_CSD_Strategy_Repository);
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_CSD_Framework_Loader);
+ ACE_Service_Config::process_directive (
+ ace_svc_desc_TAO_CSD_Object_Adapter_Factory);
+ ACE_Service_Config::process_directive (
+ ace_svc_desc_TAO_CSD_Strategy_Repository);
+ ACE_Service_Config::process_directive (
+ ace_svc_desc_TAO_CSD_Framework_Loader);
return 0;
}
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
index 21ddd602ef6..df57ecaaac7 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy_Factory.cpp
@@ -35,13 +35,13 @@ TAO::CSD::TP_Strategy_Factory::init (int argc,
initialized = 1;
TAO_CSD_Strategy_Repository *repo =
ACE_Dynamic_Service<TAO_CSD_Strategy_Repository>::instance
- ("TAO_CSD_Strategy_Repository");
+ (ACE_TEXT ("TAO_CSD_Strategy_Repository"));
if (repo == 0)
{
TAO_CSD_ThreadPool::init ();
repo = ACE_Dynamic_Service<TAO_CSD_Strategy_Repository>::instance
- ("TAO_CSD_Strategy_Repository");
+ (ACE_TEXT ("TAO_CSD_Strategy_Repository"));
}
if (repo == 0)
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
index a64feb59e52..80f1ac5f23a 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
@@ -78,7 +78,8 @@ TAO::CSD::TP_Task::open(void* args)
{
ACE_ERROR_RETURN((LM_ERROR,
ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
- ACE_TEXT ("num_threads (%u) is too large. Max is %d.\n"),
+ ACE_TEXT ("num_threads (%u) is too large. ")
+ ACE_TEXT ("Max is %d.\n"),
num, MAX_THREADPOOL_TASK_WORKER_THREADS),
-1);
}
diff --git a/TAO/tao/CSD_ThreadPool/CSD_ThreadPool.cpp b/TAO/tao/CSD_ThreadPool/CSD_ThreadPool.cpp
index a4356408f4b..120f88a3a73 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_ThreadPool.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_ThreadPool.cpp
@@ -58,7 +58,8 @@ TAO_CSD_ThreadPool::init (void)
PortableInterceptor::ORBInitializer_var dll_initializer;
dll_initializer = temp_dll_initializer;
- PortableInterceptor::register_orb_initializer (dll_initializer.in ());
+ PortableInterceptor::register_orb_initializer (
+ dll_initializer.in ());
}
catch (const ::CORBA::Exception& ex)
{
@@ -69,7 +70,8 @@ TAO_CSD_ThreadPool::init (void)
}
- return ACE_Service_Config::process_directive (ace_svc_desc_TAO_CSD_TP_Strategy_Factory);
+ return ACE_Service_Config::process_directive (
+ ace_svc_desc_TAO_CSD_TP_Strategy_Factory);
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Dynamic_TP/DTP_Config.cpp b/TAO/tao/Dynamic_TP/DTP_Config.cpp
index 85e37764dc2..47768ce0b99 100644
--- a/TAO/tao/Dynamic_TP/DTP_Config.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Config.cpp
@@ -33,24 +33,27 @@ TAO_DTP_Config_Registry::init (int , ACE_TCHAR* [] )
}
bool
-TAO_DTP_Config_Registry::find (const ACE_CString& name, TAO_DTP_Definition &entry)
+TAO_DTP_Config_Registry::find (const ACE_CString& name,
+ TAO_DTP_Definition &entry)
{
return registry_.find (name, entry) == 0;
}
int
-TAO_DTP_Config_Registry::bind (const ACE_CString& name, TAO_DTP_Definition &entry)
+TAO_DTP_Config_Registry::bind (const ACE_CString& name,
+ TAO_DTP_Definition &entry)
{
return registry_.bind (name, entry);
}
int
-TAO_DTP_Config_Registry::rebind (const ACE_CString& name, TAO_DTP_Definition &entry)
+TAO_DTP_Config_Registry::rebind (const ACE_CString& name,
+ TAO_DTP_Definition &entry)
{
return registry_.rebind (name, entry);
}
-//--------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------
TAO_DTP_Config::TAO_DTP_Config (void)
{
@@ -63,12 +66,7 @@ TAO_DTP_Config::~TAO_DTP_Config (void)
int
TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
{
-// TAO_DTP_Definition entry = {-1,5,-1,0,60,0};
TAO_DTP_Definition entry;
- bool min_threads_set = false;
- bool init_threads_set = false;
- bool max_threads_set = false;
- bool timeout_set = false;
ACE_TCHAR *name = 0;
bool overwrite = false;
@@ -79,48 +77,68 @@ TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
for (curarg = 0; curarg < argc; ++curarg)
{
long val = 0;
- if ((r = this->parse_string (curarg, argc, argv, ACE_TEXT("-DTPName"),name )) != 0)
+ if ((r = this->parse_string (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPName"),name )) != 0)
{
if (r < 0)
{
return -1;
}
}
- else if ((r = this->parse_bool (curarg, argc, argv, ACE_TEXT("-DTPOverwrite"), overwrite )) != 0)
+ else if ((r = this->parse_bool (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPOverwrite"),
+ overwrite )) != 0)
{
if (r < 0)
{
return -1;
}
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPMin"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPMin"),
+ val )) != 0)
{
if (r < 0)
{
return -1;
}
- min_threads_set = true;
entry.min_threads_ = val;
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPInit"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPInit"),
+ val )) != 0)
{
if (r < 0)
{
return -1;
}
- init_threads_set = true;
entry.init_threads_ = val;
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPMax"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPMax"),
+ val )) != 0)
{
if (r < 0)
{
return -1;
}
- max_threads_set = true;
entry.max_threads_ = val;
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPStack"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPStack"),
+ val )) != 0)
{
if (r < 0)
{
@@ -128,16 +146,23 @@ TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
}
entry.stack_size_ = val;
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPTImeout"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPTImeout"),
+ val )) != 0)
{
if (r < 0)
{
return -1;
}
- timeout_set = true;
entry.timeout_ = val;
}
- else if ((r = this->parse_long (curarg, argc, argv, ACE_TEXT("-DTPQueue"), val )) != 0)
+ else if ((r = this->parse_long (curarg,
+ argc,
+ argv,
+ ACE_TEXT("-DTPQueue"),
+ val )) != 0)
{
if (r < 0)
{
@@ -150,7 +175,8 @@ TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
if (TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_Config - Unrecognized argv[%d], %C\n"),
+ ACE_TEXT ("TAO (%P|%t) - DTP_Config - ")
+ ACE_TEXT ("Unrecognized argv[%d], %C\n"),
curarg, argv[curarg]));
}
return -1;
@@ -163,9 +189,13 @@ TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
if (TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_Config - thread count constraint ")
- ACE_TEXT ("violated, min: %d <= init: %d <= max: %d or max = -1\n"),
- entry.min_threads_, entry.init_threads_, entry.max_threads_));
+ ACE_TEXT ("TAO (%P|%t) - DTP_Config - ")
+ ACE_TEXT ("thread count constraint ")
+ ACE_TEXT ("violated, min: %d <= init: %d <= max: ")
+ ACE_TEXT ("%d or max = -1\n"),
+ entry.min_threads_,
+ entry.init_threads_,
+ entry.max_threads_));
}
return 0;
}
@@ -186,7 +216,8 @@ TAO_DTP_Config::init (int argc, ACE_TCHAR* argv[])
if (TAO_debug_level > 0)
{
ACE_DEBUG((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_Config - cannot initialize registry\n")));
+ ACE_TEXT ("TAO (%P|%t) - DTP_Config - ")
+ ACE_TEXT ("cannot initialize registry\n")));
}
return -1;
}
@@ -240,8 +271,8 @@ TAO_DTP_Config::parse_bool (int &curarg,
int
TAO_DTP_Config::parse_string (int &curarg,
- int argc, ACE_TCHAR *argv[],
- const ACE_TCHAR *match, ACE_TCHAR *&value)
+ int argc, ACE_TCHAR *argv[],
+ const ACE_TCHAR *match, ACE_TCHAR *&value)
{
if (ACE_OS::strcasecmp (argv[curarg], match) != 0)
return 0;
@@ -260,7 +291,7 @@ TAO_DTP_Config::parse_string (int &curarg,
void
TAO_DTP_Config::report_option_value_error (const ACE_TCHAR* option_name,
- const ACE_TCHAR* option_value)
+ const ACE_TCHAR* option_value)
{
if (TAO_debug_level > 0)
{
diff --git a/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp b/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
index 9c3c7e3e7cc..d193c3b54ea 100644
--- a/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_ORBInitializer.cpp
@@ -60,14 +60,19 @@ TAO_DTP_ORBInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr info)
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) TAO_DTP_ORBInitializer::pre_init:\n")
- ACE_TEXT ("(%P|%t) Unable to resolve DTP_Config object\n")));
+ ACE_TEXT ("(%P|%t) Unable to resolve DTP_Config ")
+ ACE_TEXT ("object\n")));
throw ::CORBA::INTERNAL ();
}
- // Set the name of the thread lane resources manager to be DTP_Thread_Lane_Resources_Manager.
- tao_info->orb_core ()->orb_params ()->thread_lane_resources_manager_factory_name ("DTP_Thread_Lane_Resources_Manager_Factory");
- ACE_Service_Config::process_directive (ace_svc_desc_TAO_DTP_Thread_Lane_Resources_Manager_Factory);
+ // Set the name of the thread lane resources manager to be
+ // DTP_Thread_Lane_Resources_Manager.
+ tao_info->orb_core ()->orb_params ()
+ ->thread_lane_resources_manager_factory_name (
+ "DTP_Thread_Lane_Resources_Manager_Factory");
+ ACE_Service_Config::process_directive (
+ ace_svc_desc_TAO_DTP_Thread_Lane_Resources_Manager_Factory);
}
@@ -104,8 +109,10 @@ TAO_DTP_ORBInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info)
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("(%P|%t) TAO_DTP_ORBInitializer::post_init:\n")
- ACE_TEXT ("(%P|%t) Unable to resolve DTP_Config object\n")));
+ ACE_TEXT ("(%P|%t) TAO_DTP_ORBInitializer::")
+ ACE_TEXT ("post_init:\n")
+ ACE_TEXT ("(%P|%t) Unable to resolve ")
+ ACE_TEXT ("DTP_Config object\n")));
throw ::CORBA::INTERNAL ();
}
diff --git a/TAO/tao/Dynamic_TP/DTP_ORB_Loader.cpp b/TAO/tao/Dynamic_TP/DTP_ORB_Loader.cpp
index 984abc5d438..838e0a7e3d1 100644
--- a/TAO/tao/Dynamic_TP/DTP_ORB_Loader.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_ORB_Loader.cpp
@@ -47,7 +47,7 @@ TAO_DTP_ORB_Loader::init (int argc, ACE_TCHAR* argv[])
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - DTP_ORB_Loader - ")
- ACE_TEXT ("DTPORB arbument missing value\n")));
+ ACE_TEXT ("DTPORB argument missing value\n")));
}
return -1;
}
diff --git a/TAO/tao/Dynamic_TP/DTP_POA_Loader.cpp b/TAO/tao/Dynamic_TP/DTP_POA_Loader.cpp
index cf5320e6a15..b11349f98a4 100644
--- a/TAO/tao/Dynamic_TP/DTP_POA_Loader.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_POA_Loader.cpp
@@ -49,7 +49,8 @@ TAO_DTP_POA_Loader::init (int argc, ACE_TCHAR* argv[])
if (repo == 0)
{
- ACE_Service_Config::process_directive(ace_svc_desc_TAO_CSD_Strategy_Repository);
+ ACE_Service_Config::process_directive(
+ ace_svc_desc_TAO_CSD_Strategy_Repository);
repo = ACE_Dynamic_Service<TAO_CSD_Strategy_Repository>::instance
("TAO_CSD_Strategy_Repository");
}
@@ -73,10 +74,12 @@ TAO_DTP_POA_Loader::init (int argc, ACE_TCHAR* argv[])
if (TAO_debug_level > 0)
{
ACE_DEBUG((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_POA_Loader - parsing args\n")));
+ ACE_TEXT ("TAO (%P|%t) - DTP_POA_Loader - ")
+ ACE_TEXT ("parsing args\n")));
}
- if (ACE_OS::strcasecmp (argv[curarg], ACE_TEXT ("-DTPPOAConfigMap")) == 0)
+ if (ACE_OS::strcasecmp (argv[curarg], ACE_TEXT ("-DTPPOAConfigMap"))
+ == 0)
{
++curarg;
if (curarg >= argc)
@@ -116,7 +119,7 @@ TAO_DTP_POA_Loader::init (int argc, ACE_TCHAR* argv[])
int
TAO_DTP_POA_Loader::load_poa_map (ACE_TCHAR *map,
- TAO_CSD_Strategy_Repository *repo)
+ TAO_CSD_Strategy_Repository *repo)
{
ACE_CString poa_name;
@@ -147,7 +150,7 @@ TAO_DTP_POA_Loader::load_poa_map (ACE_TCHAR *map,
ACE_NEW_RETURN(strategy_container,
TAO_DTP_POA_Strategy(config_name,
- false), -1);
+ false), -1);
sep = ACE_OS::strchr (map, ',');
while (sep != 0)
@@ -166,7 +169,7 @@ TAO_DTP_POA_Loader::load_poa_map (ACE_TCHAR *map,
void
TAO_DTP_POA_Loader::report_option_value_error (const ACE_TCHAR* name,
- const ACE_TCHAR* value)
+ const ACE_TCHAR* value)
{
if (TAO_debug_level > 0)
{
diff --git a/TAO/tao/Dynamic_TP/DTP_POA_Loader.h b/TAO/tao/Dynamic_TP/DTP_POA_Loader.h
index 9fba1917330..6af4993b46c 100644
--- a/TAO/tao/Dynamic_TP/DTP_POA_Loader.h
+++ b/TAO/tao/Dynamic_TP/DTP_POA_Loader.h
@@ -31,8 +31,6 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-class TAO_POA_Core; //TODO: Do we still need this?
-
class TAO_Dynamic_TP_Export TAO_DTP_POA_Loader : public ACE_Service_Object
{
public:
diff --git a/TAO/tao/Dynamic_TP/DTP_POA_Strategy.cpp b/TAO/tao/Dynamic_TP/DTP_POA_Strategy.cpp
index 486714872ea..e715319750b 100644
--- a/TAO/tao/Dynamic_TP/DTP_POA_Strategy.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_POA_Strategy.cpp
@@ -24,58 +24,67 @@ TAO_DTP_POA_Strategy::~TAO_DTP_POA_Strategy()
}
TAO_DTP_POA_Strategy::CustomRequestOutcome
-TAO_DTP_POA_Strategy::custom_synch_request(TAO::CSD::TP_Custom_Request_Operation* op)
+TAO_DTP_POA_Strategy::custom_synch_request(
+ TAO::CSD::TP_Custom_Request_Operation* op)
{
TAO::CSD::TP_Servant_State::HandleType servant_state =
- this->get_servant_state(op->servant());
+ this->get_servant_state(op->servant());
- TAO::CSD::TP_Custom_Synch_Request_Handle request = new
- TAO::CSD::TP_Custom_Synch_Request(op, servant_state.in());
+ TAO::CSD::TP_Custom_Synch_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Custom_Synch_Request(op, servant_state.in ()),
+ REQUEST_REJECTED);
- if (!this->dtp_task_.add_request(request.in()))
+ TAO::CSD::TP_Custom_Synch_Request_Handle request = req_ptr;
+
+ if (!this->dtp_task_.add_request (request.in ()))
{
// The request was rejected by the task.
return REQUEST_REJECTED;
}
// Now we wait until the request is handled (executed or cancelled).
- return (request->wait()) ? REQUEST_EXECUTED : REQUEST_CANCELLED;
+ return (request->wait ()) ? REQUEST_EXECUTED : REQUEST_CANCELLED;
}
TAO_DTP_POA_Strategy::CustomRequestOutcome
-TAO_DTP_POA_Strategy::custom_asynch_request(TAO::CSD::TP_Custom_Request_Operation* op)
+TAO_DTP_POA_Strategy::custom_asynch_request (
+ TAO::CSD::TP_Custom_Request_Operation* op)
{
TAO::CSD::TP_Servant_State::HandleType servant_state =
- this->get_servant_state(op->servant());
+ this->get_servant_state (op->servant ());
+
+ TAO::CSD::TP_Custom_Asynch_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Custom_Asynch_Request (op, servant_state.in ()),
+ REQUEST_REJECTED);
- TAO::CSD::TP_Custom_Asynch_Request_Handle request = new
- TAO::CSD::TP_Custom_Asynch_Request(op, servant_state.in());
+ TAO::CSD::TP_Custom_Asynch_Request_Handle request = req_ptr;
- return (this->dtp_task_.add_request(request.in()))
- ? REQUEST_DISPATCHED : REQUEST_REJECTED;
+ return (this->dtp_task_.add_request (request.in ()))
+ ? REQUEST_DISPATCHED : REQUEST_REJECTED;
}
bool
-TAO_DTP_POA_Strategy::poa_activated_event_i(TAO_ORB_Core& orb_core)
+TAO_DTP_POA_Strategy::poa_activated_event_i (TAO_ORB_Core& orb_core)
{
- this->dtp_task_.thr_mgr(orb_core.thr_mgr());
+ this->dtp_task_.thr_mgr (orb_core.thr_mgr ());
// Activates the worker threads, and waits until all have been started.
-
if (!this->config_initialized_)
{
TAO_DTP_Config_Registry * config_repo =
ACE_Dynamic_Service<TAO_DTP_Config_Registry>::instance
- ("DTP_Config_Registry");
+ ("DTP_Config_Registry");
if (config_repo == 0)
{
if (TAO_debug_level > 0)
{
- ACE_DEBUG((LM_DEBUG,
+ ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy - ")
ACE_TEXT ("cannot retrieve configuration repo\n")));
}
@@ -84,14 +93,15 @@ TAO_DTP_POA_Strategy::poa_activated_event_i(TAO_ORB_Core& orb_core)
else
{
TAO_DTP_Definition config_entry;
- if (!config_repo->find(this->dynamic_tp_config_name_, config_entry))
+ if (!config_repo->find (this->dynamic_tp_config_name_, config_entry))
{
- ACE_DEBUG((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy - ")
- ACE_TEXT ("warning: config not found...using defaults!\n")));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy - ")
+ ACE_TEXT ("warning: config not found...using ")
+ ACE_TEXT ("defaults!\n")));
}
- this->set_dtp_config(config_entry);
+ this->set_dtp_config (config_entry);
//this->dtp_task_.set_init_pool_threads(config_entry.init_threads_);
//this->dtp_task_.set_min_pool_threads(config_entry.min_threads_);
//this->dtp_task_.set_max_pool_threads(config_entry.max_threads_);
@@ -103,12 +113,12 @@ TAO_DTP_POA_Strategy::poa_activated_event_i(TAO_ORB_Core& orb_core)
}
- return (this->dtp_task_.open() == 0);
+ return (this->dtp_task_.open () == 0);
}
void
-TAO_DTP_POA_Strategy::poa_deactivated_event_i()
+TAO_DTP_POA_Strategy::poa_deactivated_event_i ()
{
// Passing in a value of 1 means that we want to shutdown the task, which
// equates to causing all worker threads to shutdown. The worker threads
@@ -127,24 +137,28 @@ TAO_DTP_POA_Strategy::dispatch_remote_request_i
PortableServer::Servant servant)
{
TAO::CSD::TP_Servant_State::HandleType servant_state =
- this->get_servant_state(servant);
+ this->get_servant_state (servant);
// Now we can create the TP_Remote_Request object, and then add it to our
// task_'s "request queue".
//
// TBD-CSD: Need to use a Cached Allocator to "create" the
// TP_Remote_Request objects. For now, use the heap.
- TAO::CSD::TP_Remote_Request_Handle request =
- new TAO::CSD::TP_Remote_Request(server_request,
- object_id,
- poa,
- operation,
- servant,
- servant_state.in());
+ TAO::CSD::TP_Remote_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Remote_Request (server_request,
+ object_id,
+ poa,
+ operation,
+ servant,
+ servant_state.in ()),
+ TAO::CSD::Strategy_Base::DISPATCH_REJECTED);
+
+ TAO::CSD::TP_Remote_Request_Handle request = req_ptr;
// Hand the request object to our task so that it can add the request
// to its "request queue".
- if (!this->dtp_task_.add_request(request.in()))
+ if (!this->dtp_task_.add_request (request.in ()))
{
// Return the DISPATCH_REJECTED return code so that the caller (our
// base class' dispatch_request() method) knows that we did
@@ -166,58 +180,77 @@ TAO_DTP_POA_Strategy::dispatch_collocated_request_i
TAO::CSD::TP_Servant_State::HandleType servant_state =
- this->get_servant_state(servant);
+ this->get_servant_state (servant);
- bool is_sync_with_server = server_request.sync_with_server();
- bool is_synchronous = server_request.response_expected();
+ bool is_sync_with_server = server_request.sync_with_server ();
+ bool is_synchronous = server_request.response_expected ();
- TAO::CSD::TP_Collocated_Synch_Request_Handle synch_request;
- TAO::CSD::TP_Collocated_Synch_With_Server_Request_Handle synch_with_server_request;
- TAO::CSD::TP_Request_Handle request;
+ TAO::CSD::TP_Collocated_Synch_Request_Handle
+ synch_request;
+ TAO::CSD::TP_Collocated_Synch_With_Server_Request_Handle
+ synch_with_server_request;
+ TAO::CSD::TP_Request_Handle
+ request;
// Create the request object using the appropriate concrete type.
if (is_sync_with_server)
{
- synch_with_server_request =
- new TAO::CSD::TP_Collocated_Synch_With_Server_Request
- (server_request,
- object_id,
- poa,
- operation,
- servant,
- servant_state.in());
+ TAO::CSD::TP_Collocated_Synch_With_Server_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Collocated_Synch_With_Server_Request
+ (server_request,
+ object_id,
+ poa,
+ operation,
+ servant,
+ servant_state.in ()),
+ DISPATCH_REJECTED);
+
+ synch_with_server_request = req_ptr;
// Give the request handle its own "copy".
- synch_with_server_request->_add_ref();
- request = synch_with_server_request.in();
+ synch_with_server_request->_add_ref ();
+ request = synch_with_server_request.in ();
}
else if (is_synchronous)
{
- synch_request = new TAO::CSD::TP_Collocated_Synch_Request(server_request,
- object_id,
- poa,
- operation,
- servant,
- servant_state.in());
+
+ TAO::CSD::TP_Collocated_Synch_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Collocated_Synch_Request (
+ server_request,
+ object_id,
+ poa,
+ operation,
+ servant,
+ servant_state.in ()),
+ DISPATCH_REJECTED);
+
+ synch_request = req_ptr;
// Give the request handle its own "copy".
- synch_request->_add_ref();
- request = synch_request.in();
+ synch_request->_add_ref ();
+ request = synch_request.in ();
}
else
{
+ TAO::CSD::TP_Collocated_Asynch_Request *req_ptr;
+ ACE_NEW_RETURN (req_ptr,
+ TAO::CSD::TP_Collocated_Asynch_Request (server_request,
+ object_id,
+ poa,
+ operation,
+ servant,
+ servant_state.in ()),
+ DISPATCH_REJECTED);
+
// Just use the (base) request handle to hold the request object.
- request = new TAO::CSD::TP_Collocated_Asynch_Request(server_request,
- object_id,
- poa,
- operation,
- servant,
- servant_state.in());
+ request = req_ptr;
}
// Hand the request object to our task so that it can add the request
// to its "request queue".
- if (!this->dtp_task_.add_request(request.in()))
+ if (!this->dtp_task_.add_request (request.in ()))
{
// Return the DISPATCH_REJECTED return code so that the caller (our
// base class' dispatch_request() method) knows that we did
@@ -227,13 +260,13 @@ TAO_DTP_POA_Strategy::dispatch_collocated_request_i
// We need to wait on the request object if the request type is a
// synchronous request.
- if (!synch_request.is_nil())
+ if (!synch_request.is_nil ())
{
- int srw = synch_request->wait();
+ int srw = synch_request->wait ();
if (srw == false)
{
// Raise exception when request was cancelled.
- throw ::CORBA::NO_IMPLEMENT();
+ throw ::CORBA::NO_IMPLEMENT ();
}
}
else if (!synch_with_server_request.is_nil())
@@ -242,7 +275,7 @@ TAO_DTP_POA_Strategy::dispatch_collocated_request_i
if (swsr == false)
{
// Raise exception when request was cancelled.
- throw ::CORBA::NO_IMPLEMENT();
+ throw ::CORBA::NO_IMPLEMENT ();
}
}
@@ -257,7 +290,7 @@ TAO_DTP_POA_Strategy::servant_activated_event_i
if (this->serialize_servants_)
{
// Add the servant to the servant state map.
- this->servant_state_map_.insert(servant);
+ this->servant_state_map_.insert (servant);
}
}
@@ -267,96 +300,98 @@ TAO_DTP_POA_Strategy::servant_deactivated_event_i
const PortableServer::ObjectId&)
{
// Cancel all requests stuck in the queue for the specified servant.
- this->dtp_task_.cancel_servant(servant);
+ this->dtp_task_.cancel_servant (servant);
if (this->serialize_servants_)
{
// Remove the servant from the servant state map.
- this->servant_state_map_.remove(servant);
+ this->servant_state_map_.remove (servant);
}
}
void
-TAO_DTP_POA_Strategy::cancel_requests(PortableServer::Servant servant)
+TAO_DTP_POA_Strategy::cancel_requests (PortableServer::Servant servant)
{
// Cancel all requests stuck in the queue for the specified servant.
- this->dtp_task_.cancel_servant(servant);
+ this->dtp_task_.cancel_servant (servant);
}
TAO::CSD::TP_Servant_State::HandleType
-TAO_DTP_POA_Strategy::get_servant_state(PortableServer::Servant servant)
+TAO_DTP_POA_Strategy::get_servant_state (PortableServer::Servant servant)
{
TAO::CSD::TP_Servant_State::HandleType servant_state;
if (this->serialize_servants_)
{
- servant_state = this->servant_state_map_.find(servant);
+ servant_state = this->servant_state_map_.find (servant);
}
return servant_state;
}
void
-TAO_DTP_POA_Strategy::set_dtp_config(TAO_DTP_Definition &tp_config)
+TAO_DTP_POA_Strategy::set_dtp_config (TAO_DTP_Definition &tp_config)
{
if (tp_config.min_threads_ <= 0)
{
- this->dtp_task_.set_min_pool_threads(1);
- this->dtp_task_.set_thread_idle_time(ACE_Time_Value(0,0));
+ this->dtp_task_.set_min_pool_threads (1);
+ this->dtp_task_.set_thread_idle_time (ACE_Time_Value (0,0));
}
else
{
- this->dtp_task_.set_min_pool_threads(tp_config.min_threads_);
- this->dtp_task_.set_thread_idle_time(tp_config.timeout_);
+ this->dtp_task_.set_min_pool_threads (tp_config.min_threads_);
+ this->dtp_task_.set_thread_idle_time (tp_config.timeout_);
}
// initial_pool_threads_
if ((tp_config.init_threads_ <= 0) ||
(tp_config.init_threads_ < tp_config.min_threads_))
{
- this->dtp_task_.set_init_pool_threads(this->dtp_task_.get_min_pool_threads());
+ this->dtp_task_.set_init_pool_threads (this->dtp_task_.get_min_pool_threads());
}
else
{
- this->dtp_task_.set_init_pool_threads(tp_config.init_threads_);
+ this->dtp_task_.set_init_pool_threads (tp_config.init_threads_);
}
// max_pool_threads_
if (tp_config.max_threads_ <= 0)
{
- this->dtp_task_.set_max_pool_threads(0); // Set to 0 so that max is unbounded.
+ // Set to 0 so that max is unbounded.
+ this->dtp_task_.set_max_pool_threads(0);
}
else
if (tp_config.max_threads_ < tp_config.init_threads_)
{
- this->dtp_task_.set_max_pool_threads(this->dtp_task_.get_init_pool_threads());
+ this->dtp_task_.set_max_pool_threads(
+ this->dtp_task_.get_init_pool_threads ());
}
else
{
- this->dtp_task_.set_max_pool_threads(tp_config.max_threads_);
+ this->dtp_task_.set_max_pool_threads (tp_config.max_threads_);
}
// thread_stack_size_
if (tp_config.stack_size_ <= 0)
{
- this->dtp_task_.set_thread_stack_size(ACE_DEFAULT_THREAD_STACKSIZE);
+ this->dtp_task_.set_thread_stack_size (ACE_DEFAULT_THREAD_STACKSIZE);
}
else
{
- this->dtp_task_.set_thread_stack_size(tp_config.stack_size_);
+ this->dtp_task_.set_thread_stack_size (tp_config.stack_size_);
}
// max_request_queue_depth_
if (tp_config.queue_depth_ < 0)
{
- this->dtp_task_.set_max_request_queue_depth(0);
+ this->dtp_task_.set_max_request_queue_depth (0);
}
else
{
- this->dtp_task_.set_max_request_queue_depth(tp_config.queue_depth_);
+ this->dtp_task_.set_max_request_queue_depth (tp_config.queue_depth_);
}
@@ -365,10 +400,12 @@ TAO_DTP_POA_Strategy::set_dtp_config(TAO_DTP_Definition &tp_config)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy: ")
ACE_TEXT ("Initialized with:\n")
- ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy initial_pool_threads_=[%d]\n")
+ ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy initial_pool_threads_=")
+ ACE_TEXT ("[%d]\n")
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy min_pool_threads_=[%d]\n")
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy max_pool_threads_=[%d]\n")
- ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy max_request_queue_depth_=[%d]\n")
+ ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy max_request_queue_depth_=")
+ ACE_TEXT ("[%d]\n")
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy thread_stack_size_=[%d]\n")
ACE_TEXT ("TAO (%P|%t) - DTP_POA_Strategy thread_idle_time_=[%d]\n"),
this->dtp_task_.get_init_pool_threads(),
diff --git a/TAO/tao/Dynamic_TP/DTP_POA_Strategy.inl b/TAO/tao/Dynamic_TP/DTP_POA_Strategy.inl
index 598e4e8b37f..3ce52bb554b 100644
--- a/TAO/tao/Dynamic_TP/DTP_POA_Strategy.inl
+++ b/TAO/tao/Dynamic_TP/DTP_POA_Strategy.inl
@@ -6,9 +6,8 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
/// Constructor.
-TAO_DTP_POA_Strategy::TAO_DTP_POA_Strategy
-(ACE_CString tp_config_name,
- bool ss)
+TAO_DTP_POA_Strategy::TAO_DTP_POA_Strategy (ACE_CString tp_config_name,
+ bool ss)
: serialize_servants_ (ss),
config_initialized_ (false)
{
@@ -16,20 +15,17 @@ TAO_DTP_POA_Strategy::TAO_DTP_POA_Strategy
}
ACE_INLINE
-TAO_DTP_POA_Strategy::TAO_DTP_POA_Strategy
-(TAO_DTP_Definition * tp_config,
- bool ss)
+TAO_DTP_POA_Strategy::TAO_DTP_POA_Strategy (TAO_DTP_Definition * tp_config,
+ bool ss)
: serialize_servants_ (ss),
config_initialized_ (true)
{
-
- this->set_dtp_config(*tp_config);
-
+ this->set_dtp_config (*tp_config);
}
ACE_INLINE
void
-TAO_DTP_POA_Strategy::set_servant_serialization(bool serialize_servants)
+TAO_DTP_POA_Strategy::set_servant_serialization (bool serialize_servants)
{
// Simple Mutator.
this->serialize_servants_ = serialize_servants;
diff --git a/TAO/tao/Dynamic_TP/DTP_Task.cpp b/TAO/tao/Dynamic_TP/DTP_Task.cpp
index 377f5c70779..cc6f30c310c 100644
--- a/TAO/tao/Dynamic_TP/DTP_Task.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Task.cpp
@@ -11,15 +11,15 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_DTP_Task::TAO_DTP_Task()
- : aw_lock_(),
- queue_lock_(),
- work_lock_(),
- work_available_(this->work_lock_),
- active_workers_(this->aw_lock_),
- accepting_requests_(false),
- shutdown_(false),
- opened_(false),
+TAO_DTP_Task::TAO_DTP_Task ()
+ : aw_lock_ (),
+ queue_lock_ (),
+ work_lock_ (),
+ work_available_ (this->work_lock_),
+ active_workers_ (this->aw_lock_),
+ accepting_requests_ (false),
+ shutdown_ (false),
+ opened_ (false),
num_queue_requests_ ((size_t)0)
{
}
@@ -29,7 +29,7 @@ TAO_DTP_Task::~TAO_DTP_Task()
}
bool
-TAO_DTP_Task::add_request(TAO::CSD::TP_Request* request)
+TAO_DTP_Task::add_request (TAO::CSD::TP_Request* request)
{
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->queue_lock_, false);
@@ -45,9 +45,12 @@ TAO_DTP_Task::add_request(TAO::CSD::TP_Request* request)
if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() not accepting requests.\n")
- ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() num_queue_requests_ : [%d]\n")
- ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() max_request_queue_depth_ : [%d]\n"),
+ ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() ")
+ ACE_TEXT ("not accepting requests.\n")
+ ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() ")
+ ACE_TEXT ("num_queue_requests_ : [%d]\n")
+ ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() ")
+ ACE_TEXT ("max_request_queue_depth_ : [%d]\n"),
this->num_queue_requests_,
this->max_request_queue_depth_));
}
@@ -68,11 +71,12 @@ TAO_DTP_Task::add_request(TAO::CSD::TP_Request* request)
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->work_lock_, false);
- this->work_available_.signal();
+ this->work_available_.signal ();
if (TAO_debug_level > 4 )
{
- ACE_DEBUG((LM_DEBUG,"TAO (%P|%t) - DTP_Task::add_request() - "
- "work available\n"));
+ ACE_DEBUG((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - DTP_Task::add_request() - ")
+ ACE_TEXT ("work available\n")));
}
}
@@ -80,42 +84,42 @@ TAO_DTP_Task::add_request(TAO::CSD::TP_Request* request)
}
size_t
-TAO_DTP_Task::get_init_pool_threads()
+TAO_DTP_Task::get_init_pool_threads ()
{
- return(this->init_pool_threads_);
+ return (this->init_pool_threads_);
}
size_t
-TAO_DTP_Task::get_min_pool_threads()
+TAO_DTP_Task::get_min_pool_threads ()
{
return(this->min_pool_threads_);
}
-size_t TAO_DTP_Task::get_max_pool_threads()
+size_t TAO_DTP_Task::get_max_pool_threads ()
{
return(this->max_pool_threads_);
}
size_t
-TAO_DTP_Task::get_max_request_queue_depth()
+TAO_DTP_Task::get_max_request_queue_depth ()
{
return(this->max_request_queue_depth_);
}
size_t
-TAO_DTP_Task::get_thread_stack_size()
+TAO_DTP_Task::get_thread_stack_size ()
{
return(this->thread_stack_size_);
}
time_t
-TAO_DTP_Task::get_thread_idle_time()
+TAO_DTP_Task::get_thread_idle_time ()
{
return(this->thread_idle_time_.sec());
}
int
-TAO_DTP_Task::open(void* /* args */)
+TAO_DTP_Task::open (void* /* args */)
{
size_t num = 1;
@@ -154,7 +158,7 @@ TAO_DTP_Task::open(void* /* args */)
this->max_pool_threads_,
this->max_request_queue_depth_,
this->thread_stack_size_,
- this->thread_idle_time_.sec())
+ this->thread_idle_time_.sec ())
);
}
@@ -187,7 +191,7 @@ TAO_DTP_Task::open(void* /* args */)
// Activate this task object with 'num' worker threads.
if (this->thread_stack_size_ == 0)
{
- if (this->activate(THR_NEW_LWP | THR_DETACHED, num, 1) != 0)
+ if (this->activate (THR_NEW_LWP | THR_DETACHED, num, 1) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) DTP_Task::open() failed to activate ")
@@ -204,15 +208,15 @@ TAO_DTP_Task::open(void* /* args */)
stack_sz_arr[z] = this->thread_stack_size_;
}
- if (this->activate(THR_NEW_LWP | THR_DETACHED,
- num,
- 1,
- ACE_DEFAULT_THREAD_PRIORITY,
- -1,
- 0,
- 0,
- 0,
- stack_sz_arr) != 0)
+ if (this->activate (THR_NEW_LWP | THR_DETACHED,
+ num,
+ 1,
+ ACE_DEFAULT_THREAD_PRIORITY,
+ -1,
+ 0,
+ 0,
+ 0,
+ stack_sz_arr) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) DTP_Task::open() failed to activate ")
@@ -262,11 +266,11 @@ TAO_DTP_Task::clear_request (TAO::CSD::TP_Request_Handle &r)
this->num_queue_requests_));
}
- r->mark_as_ready();
+ r->mark_as_ready ();
}
int
-TAO_DTP_Task::svc()
+TAO_DTP_Task::svc (void)
{
++this->busy_threads_;
if (TAO_debug_level > 4)
@@ -281,7 +285,7 @@ TAO_DTP_Task::svc()
{
TAO::CSD::TP_Request_Handle request;
- while (!this->shutdown_ && request.is_nil())
+ while (!this->shutdown_ && request.is_nil ())
{
if (!this->request_ready (dispatchable_visitor, request))
{
@@ -300,9 +304,9 @@ TAO_DTP_Task::svc()
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->work_lock_, false);
- int wait_state = this->thread_idle_time_.sec() == 0
- ? this->work_available_.wait()
- : this->work_available_.wait(&tmp_sec);
+ int wait_state = this->thread_idle_time_.sec () == 0
+ ? this->work_available_.wait ()
+ : this->work_available_.wait (&tmp_sec);
// Check for timeout
if (this->shutdown_)
@@ -331,12 +335,12 @@ TAO_DTP_Task::svc()
ACE_TEXT ("TAO (%P|%t) - DTP_Task::svc() ")
ACE_TEXT ("Incrementing busy_threads_. ")
ACE_TEXT ("Busy thread count:%d\n"),
- this->busy_threads_.value()));
+ this->busy_threads_.value ()));
}
}
}
- size_t count = this->thr_count();
+ size_t count = this->thr_count ();
if ((this->busy_threads_ == count) &&
((this->max_pool_threads_ == 0) ||
(count < this->max_pool_threads_)))
@@ -364,14 +368,14 @@ TAO_DTP_Task::svc()
ACE_TEXT ("TAO (%P|%t) - DTP_Task::svc() ")
ACE_TEXT ("Growing threadcount. ")
ACE_TEXT ("New thread count:%d\n"),
- this->thr_count()));
+ this->thr_count ()));
}
}
}
- request->dispatch();
+ request->dispatch ();
this->clear_request (request);
- dispatchable_visitor.reset();
+ dispatchable_visitor.reset ();
}
return 0;
}
@@ -384,7 +388,7 @@ TAO_DTP_Task::close(u_long flag)
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->aw_lock_, 0);
if (flag == 0)
{
- this->active_workers_.signal();
+ this->active_workers_.signal ();
return 0;
}
@@ -402,50 +406,50 @@ TAO_DTP_Task::close(u_long flag)
this->work_available_.broadcast();
}
- size_t in_task = (this->thr_mgr()->task() == this) ? 1 : 0;
+ size_t in_task = (this->thr_mgr ()->task () == this) ? 1 : 0;
if (TAO_debug_level > 4)
{
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - DTP_Task::close() ")
ACE_TEXT ("shutting down. in_task = %d, Count = %d \n"),
- in_task, this->thr_count()));
+ in_task, this->thr_count ()));
}
- while (this->thr_count() != in_task)
+ while (this->thr_count () != in_task)
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->aw_lock_, 0);
- this->active_workers_.wait();
+ this->active_workers_.wait ();
}
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, guard, this->queue_lock_, 0);
TAO::CSD::TP_Cancel_Visitor v;
- this->queue_.accept_visitor(v);
+ this->queue_.accept_visitor (v);
}
return 0;
}
void
-TAO_DTP_Task::set_init_pool_threads(size_t thr_count)
+TAO_DTP_Task::set_init_pool_threads (size_t thr_count)
{
this->init_pool_threads_ = thr_count;
}
void
-TAO_DTP_Task::set_min_pool_threads(size_t thr_count)
+TAO_DTP_Task::set_min_pool_threads (size_t thr_count)
{
this->min_pool_threads_ = thr_count;
}
void
-TAO_DTP_Task::set_max_pool_threads(size_t thr_count)
+TAO_DTP_Task::set_max_pool_threads (size_t thr_count)
{
this->max_pool_threads_ = thr_count;
}
void
-TAO_DTP_Task::set_thread_stack_size(size_t stack_sz)
+TAO_DTP_Task::set_thread_stack_size (size_t stack_sz)
{
this->thread_stack_size_ = stack_sz;
}
@@ -457,7 +461,7 @@ TAO_DTP_Task::set_thread_idle_time(ACE_Time_Value thr_timeout)
}
void
-TAO_DTP_Task::set_max_request_queue_depth(size_t queue_depth)
+TAO_DTP_Task::set_max_request_queue_depth (size_t queue_depth)
{
this->max_request_queue_depth_ = queue_depth;
}
@@ -468,8 +472,8 @@ TAO_DTP_Task::cancel_servant (PortableServer::Servant servant)
ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->queue_lock_);
// Cancel the requests targeted for the provided servant.
- TAO::CSD::TP_Cancel_Visitor cancel_visitor(servant);
- this->queue_.accept_visitor(cancel_visitor);
+ TAO::CSD::TP_Cancel_Visitor cancel_visitor (servant);
+ this->queue_.accept_visitor (cancel_visitor);
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp b/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp
index 6962fcafffb..1b70111c86b 100644
--- a/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.cpp
@@ -14,10 +14,11 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-TAO_DTP_Thread_Lane_Resources_Manager::TAO_DTP_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core)
- : TAO_Thread_Lane_Resources_Manager (orb_core),
- default_lane_resources_ (0),
- tp_manager_ (0)
+TAO_DTP_Thread_Lane_Resources_Manager::TAO_DTP_Thread_Lane_Resources_Manager
+ (TAO_ORB_Core &orb_core)
+ : TAO_Thread_Lane_Resources_Manager (orb_core),
+ default_lane_resources_ (0),
+ tp_manager_ (0)
{
// Create the default resources.
ACE_NEW (this->default_lane_resources_,
@@ -104,7 +105,8 @@ TAO_DTP_Thread_Lane_Resources_Manager::tp_manager (void)
}
TAO_Thread_Lane_Resources_Manager *
-TAO_DTP_Thread_Lane_Resources_Manager_Factory::create_thread_lane_resources_manager (TAO_ORB_Core &core)
+TAO_DTP_Thread_Lane_Resources_Manager_Factory::create_thread_lane_resources_manager (
+ TAO_ORB_Core &core)
{
TAO_Thread_Lane_Resources_Manager *manager = 0;
diff --git a/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h b/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h
index e8cd1fcdb9a..79278ec7726 100644
--- a/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h
+++ b/TAO/tao/Dynamic_TP/DTP_Thread_Lane_Resources_Manager.h
@@ -103,14 +103,17 @@ class TAO_Dynamic_TP_Export TAO_DTP_Thread_Lane_Resources_Manager_Factory
public:
/// Factory method.
- TAO_Thread_Lane_Resources_Manager *create_thread_lane_resources_manager (TAO_ORB_Core &core);
+ TAO_Thread_Lane_Resources_Manager *create_thread_lane_resources_manager (
+ TAO_ORB_Core &core);
};
-ACE_STATIC_SVC_DECLARE_EXPORT (TAO_Dynamic_TP, TAO_DTP_Thread_Lane_Resources_Manager_Factory)
-ACE_FACTORY_DECLARE (TAO_Dynamic_TP, TAO_DTP_Thread_Lane_Resources_Manager_Factory)
+ACE_STATIC_SVC_DECLARE_EXPORT (TAO_Dynamic_TP,
+ TAO_DTP_Thread_Lane_Resources_Manager_Factory)
+ACE_FACTORY_DECLARE (TAO_Dynamic_TP,
+ TAO_DTP_Thread_Lane_Resources_Manager_Factory)
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
index e07e94f5b39..9d03eb8cb48 100644
--- a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
@@ -55,7 +55,7 @@ TAO_DTP_Thread_Pool_Threads::svc (void)
{
// No point propagating this exception. Print it out.
ACE_ERROR ((LM_ERROR,
- "orb->run() raised exception for thread %t\n"));
+ ACE_TEXT ("orb->run() raised exception for thread %t\n")));
ex._tao_print_exception ("");
}
@@ -271,7 +271,8 @@ TAO_DTP_Thread_Pool::TAO_DTP_Thread_Pool (TAO_DTP_Thread_Pool_Manager &manager,
threads_ (*this),
new_thread_generator_ (*this)
{
- manager_.orb_core ().leader_follower ().set_new_leader_generator (&new_thread_generator_);
+ manager_.orb_core ().leader_follower ().set_new_leader_generator (
+ &new_thread_generator_);
}
void
@@ -388,9 +389,9 @@ TAO_DTP_Thread_Pool_Manager::create_threadpool_i (TAO_DTP_Definition &def)
ACE_NEW_THROW_EX (thread_pool,
TAO_DTP_Thread_Pool (*this,
- this->thread_pool_id_counter_,
- def
- ),
+ this->thread_pool_id_counter_,
+ def
+ ),
CORBA::NO_MEMORY ());
return this->create_threadpool_helper (thread_pool);
diff --git a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.h b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.h
index 8c942cbf03f..6dae84f7fa4 100644
--- a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.h
+++ b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.h
@@ -207,7 +207,8 @@ public:
void destroy_threadpool (CORBA::ULong threadpool);
/// Collection of thread pools.
- typedef ACE_Hash_Map_Manager<CORBA::ULong, TAO_DTP_Thread_Pool *, ACE_Null_Mutex> THREAD_POOLS;
+ typedef ACE_Hash_Map_Manager<CORBA::ULong, TAO_DTP_Thread_Pool *,
+ ACE_Null_Mutex> THREAD_POOLS;
/// @name Accessors
// @{
diff --git a/TAO/tao/ImR_Client/ImR_Client.cpp b/TAO/tao/ImR_Client/ImR_Client.cpp
index 0b30244ca57..810872ab321 100644
--- a/TAO/tao/ImR_Client/ImR_Client.cpp
+++ b/TAO/tao/ImR_Client/ImR_Client.cpp
@@ -17,11 +17,11 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
namespace
{
- char* find_delimiter(char* const ior, const char delimiter)
+ char* find_delimiter (char* const ior, const char delimiter)
{
// Search for "corbaloc:" alone, without the protocol. This code
// should be protocol neutral.
- const char corbaloc[] = "corbaloc:";
+ const char corbaloc[] = ACE_TEXT_ALWAYS_CHAR ("corbaloc:");
char *pos = ACE_OS::strstr (ior, corbaloc);
pos = ACE_OS::strchr (pos + sizeof (corbaloc), ':');
@@ -30,16 +30,16 @@ namespace
return pos;
}
- CORBA::Object_ptr combine(TAO_ORB_Core& orb_core,
- const TAO_Profile& profile,
- const char* const key_str,
- const char* type_id)
+ CORBA::Object_ptr combine (TAO_ORB_Core& orb_core,
+ const TAO_Profile& profile,
+ const char* const key_str,
+ const char* type_id)
{
CORBA::String_var profile_str = profile.to_string ();
// if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
- "************** IMR partial IOR =\n%C\n",
+ ACE_TEXT ("************** IMR partial IOR =\n%C\n"),
profile_str.in ()));
char* const pos = find_delimiter (profile_str.inout (),
@@ -50,21 +50,19 @@ namespace
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- "Could not parse ImR IOR, skipping ImRification\n"));
+ ACE_TEXT ("Could not parse ImR IOR, skipping ImRification\n")));
return CORBA::Object::_nil();
}
ACE_CString ior (profile_str.in ());
// Add the key.
-
-
ior += key_str;
// if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "************** ImR-ified IOR =\n%C\n\n",
- ior.c_str ()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("************** ImR-ified IOR =\n%C\n\n"),
+ ior.c_str ()));
CORBA::Object_ptr obj = orb_core.orb ()->string_to_object (ior.c_str ());
obj->_stubobj()->type_id = type_id;
@@ -74,50 +72,53 @@ namespace
class ImRifyProfiles
{
public:
- ImRifyProfiles(const TAO_MProfile& base_profiles,
- const TAO_Profile* const profile_in_use,
- TAO_ORB_Core& orb_core,
- const char* const key_str,
- const char* type_id)
- : base_profiles_(base_profiles),
- profile_in_use_(profile_in_use),
- orb_core_(orb_core),
- key_str_(key_str),
- type_id_(type_id),
- objs_(base_profiles.profile_count()),
- list_buffer_(new CORBA::Object_ptr[base_profiles.profile_count()]),
- ior_list_(base_profiles.profile_count(),
- base_profiles.profile_count(),
- list_buffer_,
- 0)
+ ImRifyProfiles (const TAO_MProfile& base_profiles,
+ const TAO_Profile* const profile_in_use,
+ TAO_ORB_Core& orb_core,
+ const char* const key_str,
+ const char* type_id)
+ : base_profiles_ (base_profiles),
+ profile_in_use_ (profile_in_use),
+ orb_core_ (orb_core),
+ key_str_ (key_str),
+ type_id_ (type_id),
+ objs_ (base_profiles.profile_count()),
+ list_buffer_ (new CORBA::Object_ptr[base_profiles.profile_count()]),
+ ior_list_ (base_profiles.profile_count (),
+ base_profiles.profile_count (),
+ list_buffer_,
+ 0)
{
}
- CORBA::Object_ptr combined_ior()
+ CORBA::Object_ptr combined_ior ()
{
- const CORBA::ULong pcount = base_profiles_.profile_count();
+ const CORBA::ULong pcount = base_profiles_.profile_count ();
for (CORBA::ULong i = 0; i < pcount; ++i)
{
- if (!combine_profile(i))
+ if (!combine_profile (i))
{
- return default_obj(ACE_TEXT("could not resolve IORManipulation"));
+ return default_obj (
+ ACE_TEXT_ALWAYS_CHAR ("could not resolve IORManipulation"));
}
}
- CORBA::Object_var IORM = orb_core_.orb()
+ CORBA::Object_var IORM = orb_core_.orb ()
->resolve_initial_references (TAO_OBJID_IORMANIPULATION, 0);
- if (CORBA::is_nil (IORM.in()))
+ if (CORBA::is_nil (IORM.in ()))
{
- return default_obj(ACE_TEXT("could not resolve IORManipulation"));
+ return default_obj (
+ ACE_TEXT_ALWAYS_CHAR ("could not resolve IORManipulation"));
}
TAO_IOP::TAO_IOR_Manipulation_var iorm =
- TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in());
+ TAO_IOP::TAO_IOR_Manipulation::_narrow (IORM.in ());
- if (CORBA::is_nil (iorm.in()))
+ if (CORBA::is_nil (iorm.in ()))
{
- return default_obj(ACE_TEXT("could not narrow IORManipulation"));
+ return default_obj (
+ ACE_TEXT_ALWAYS_CHAR ("could not narrow IORManipulation"));
}
try
@@ -126,8 +127,8 @@ namespace
}
catch (const ::CORBA::Exception& )
{
- return default_obj(
- ACE_TEXT("could not ImRify object with all profiles."));
+ return default_obj (
+ ACE_TEXT_ALWAYS_CHAR ("could not ImRify object with all profiles."));
}
}
private:
@@ -136,10 +137,10 @@ namespace
try
{
// store the combined profile+key
- list_buffer_[i] = combine(orb_core_,
- *(base_profiles_.get_profile(i)),
- key_str_,
- type_id_);
+ list_buffer_[i] = combine (orb_core_,
+ *(base_profiles_.get_profile (i)),
+ key_str_,
+ type_id_);
// manage the memory
objs_[i] = list_buffer_[i];
@@ -153,35 +154,36 @@ namespace
CORBA::Object_ptr default_obj(const char* desc)
{
- const CORBA::ULong pcount = base_profiles_.profile_count();
+ const CORBA::ULong pcount = base_profiles_.profile_count ();
const char* info =
- "because couldn't find ImR profile_in_use in profiles";
+ ACE_TEXT ("because couldn't find ImR profile_in_use in profiles");
// identify the profile in use to see if we can default to
// that profiles partial ImR-ification
for (CORBA::ULong i = 0; i < pcount; ++i)
{
- if (profile_in_use_ == base_profiles_.get_profile(i))
+ if (profile_in_use_ == base_profiles_.get_profile (i))
{
// if there is no object then try one last time to combine
// the profile
- if (CORBA::is_nil(objs_[i].in()) && !combine_profile(i))
+ if (CORBA::is_nil(objs_[i].in ()) && !combine_profile (i))
{
- info = "because couldn't ImR-ify profile_in_use";
+ info = ACE_TEXT ("because couldn't ImR-ify profile_in_use");
break;
}
ACE_ERROR((LM_ERROR,
ACE_TEXT("ERROR: %C. ")
ACE_TEXT("Defaulting to ImR-ifying profile_in_use\n"),
desc));
- return objs_[i]._retn();
+ return objs_[i]._retn ();
}
}
ACE_ERROR((LM_ERROR,
- ACE_TEXT("ERROR: %C, ")
- ACE_TEXT("but cannot default to ImR-ifying profile_in_use %C\n"),
- desc, info));
+ ACE_TEXT ("ERROR: %C, ")
+ ACE_TEXT ("but cannot default to ImR-ifying profile_in_use %C\n"),
+ desc,
+ info));
return CORBA::Object::_nil();
}
@@ -225,11 +227,13 @@ namespace TAO
ACE_CString imr_info;
if (TAO_debug_level > 1)
{
- CORBA::ORB_ptr orb = poa->orb_core().orb();
+ CORBA::ORB_ptr orb = poa->orb_core ().orb ();
CORBA::String_var ior = orb->object_to_string (imr.in ());
- imr_info = ACE_CString(", IMR IOR=") + ior.in();
+ imr_info = ACE_CString (", IMR IOR=") + ior.in ();
}
- ACE_DEBUG ((LM_DEBUG, "Notifying ImR of startup%s\n", imr_info.c_str()));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Notifying ImR of startup%s\n"),
+ imr_info.c_str ()));
}
ImplementationRepository::Administration_var imr_locator;
@@ -243,7 +247,7 @@ namespace TAO
ImplementationRepository::Administration::_narrow (imr.in ());
}
- if (CORBA::is_nil(imr_locator.in ()))
+ if (CORBA::is_nil (imr_locator.in ()))
{
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) ERROR: Narrowed IMR initial reference ")
@@ -274,7 +278,7 @@ namespace TAO
poa->server_priority (),
wait_occurred_restart_call_ignored);
- CORBA::Object_var obj = root_poa->id_to_reference_i (id.in (), false);
+ CORBA::Object_var obj = root_poa->id_to_reference_i (id.in (), false);
ImplementationRepository::ServerObject_var svr
= ImplementationRepository::ServerObject::_narrow (obj.in ());
@@ -288,17 +292,20 @@ namespace TAO
CORBA::String_var full_ior = root_poa->_get_orb()->object_to_string (obj.in ());
TAO_Profile& profile = *(svr->_stubobj ()->profile_in_use ());
CORBA::String_var ior = profile.to_string();
- ACE_DEBUG((LM_INFO,"\n\nfull_ior=<%s>\n\nior=<%s>\n\n", full_ior.in(), ior.in()));
+ ACE_DEBUG((LM_INFO,
+ "\n\nfull_ior=<%s>\n\nior=<%s>\n\n",
+ full_ior.in(),
+ ior.in()));
char* const pos = find_delimiter (ior.inout (),
profile.object_key_delimiter ());
- const ACE_CString partial_ior(ior.in (), (pos - ior.in()) + 1);
+ const ACE_CString partial_ior (ior.in (), (pos - ior.in ()) + 1);
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
- "Informing IMR that we are running at: %C\n",
- partial_ior.c_str()));
+ ACE_TEXT ("Informing IMR that we are running at: %C\n"),
+ partial_ior.c_str ()));
try
{
@@ -310,16 +317,16 @@ namespace TAO
ACE_CString name;
if (serverId.empty ())
{
- name = poa->name();
+ name = poa->name ();
}
else
{
- name = serverId + ":" + poa->name();
+ name = serverId + ":" + poa->name ();
}
imr_locator->server_is_running (name.c_str (),
- partial_ior.c_str(),
- svr.in());
+ partial_ior.c_str (),
+ svr.in ());
}
catch (const ::CORBA::SystemException&)
{
@@ -333,7 +340,8 @@ namespace TAO
}
if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG, "Successfully notified ImR of Startup\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Successfully notified ImR of Startup\n")));
}
void
@@ -353,7 +361,7 @@ namespace TAO
{
CORBA::String_var poaname = poa->the_name ();
ACE_DEBUG ((LM_DEBUG,
- "Notifying IMR of Shutdown server:%s\n",
+ ACE_TEXT ("Notifying IMR of Shutdown server:%s\n"),
poaname.in ()));
}
@@ -365,7 +373,7 @@ namespace TAO
ImplementationRepository::Administration_var imr_locator =
ImplementationRepository::Administration::_narrow (imr.in ());
- imr_locator->server_is_shutting_down (poa->name().c_str ());
+ imr_locator->server_is_shutting_down (poa->name ().c_str ());
}
catch (const ::CORBA::COMM_FAILURE&)
{
@@ -373,13 +381,17 @@ namespace TAO
// configured to drop replies during shutdown (it does by default in
// the LF model) we get a COMM_FAILURE exception which we ignore
if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG, "Ignoring COMM_FAILURE while unregistering from ImR.\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Ignoring COMM_FAILURE while unregistering")
+ ACE_TEXT ("from ImR.\n")));
}
catch (const ::CORBA::TRANSIENT&)
{
// Similarly, there are cases where we could get a TRANSIENT.
if (TAO_debug_level > 0)
- ACE_DEBUG((LM_DEBUG, "Ignoring TRANSIENT while unregistering from ImR.\n"));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Ignoring TRANSIENT while unregistering")
+ ACE_TEXT ("from ImR.\n")));
}
catch (const ::CORBA::Exception& ex)
{
@@ -390,9 +402,11 @@ namespace TAO
if (this->server_object_)
{
- PortableServer::POA_var default_poa = this->server_object_->_default_POA ();
+ PortableServer::POA_var default_poa =
+ this->server_object_->_default_POA ();
- TAO_Root_POA *root_poa = dynamic_cast <TAO_Root_POA*> (default_poa.in ());
+ TAO_Root_POA *root_poa =
+ dynamic_cast <TAO_Root_POA*> (default_poa.in ());
if (!root_poa)
{
@@ -402,7 +416,7 @@ namespace TAO
PortableServer::ObjectId_var id =
root_poa->servant_to_id_i (this->server_object_);
- root_poa->deactivate_object_i (id.in());
+ root_poa->deactivate_object_i (id.in ());
this->server_object_ = 0;
}
@@ -415,9 +429,11 @@ namespace TAO
int
ImR_Client_Adapter_Impl::Initializer (void)
{
- TAO_Root_POA::imr_client_adapter_name ("Concrete_ImR_Client_Adapter");
+ TAO_Root_POA::imr_client_adapter_name (
+ ACE_TEXT_ALWAYS_CHAR ("Concrete_ImR_Client_Adapter"));
- return ACE_Service_Config::process_directive (ace_svc_desc_ImR_Client_Adapter_Impl);
+ return ACE_Service_Config::process_directive (
+ ace_svc_desc_ImR_Client_Adapter_Impl);
}
CORBA::Object_ptr
@@ -436,7 +452,7 @@ namespace TAO
if (TAO_debug_level > 1)
{
ACE_DEBUG ((LM_DEBUG,
- "Missing ImR IOR, will not use the ImR\n"));
+ ACE_TEXT ("Missing ImR IOR, will not use the ImR\n")));
}
return CORBA::Object::_nil();
}
@@ -448,25 +464,28 @@ namespace TAO
// if there is only one profile, no need to use IORManipulation
if (base_profiles.profile_count() == 1)
{
- return combine(orb_core, *base_profiles.get_profile(0), key_str.in(), type_id);
+ return combine(orb_core,
+ *base_profiles.get_profile(0),
+ key_str.in(),
+ ACE_TEXT_ALWAYS_CHAR (type_id));
}
// need to combine each profile in the ImR with the key and
// then merge them all together into one ImR-ified ior
- ImRifyProfiles imrify(base_profiles,
- imr->_stubobj ()->profile_in_use (),
- orb_core,
- key_str,
- type_id);
+ ImRifyProfiles imrify (base_profiles,
+ imr->_stubobj ()->profile_in_use (),
+ orb_core,
+ key_str,
+ ACE_TEXT_ALWAYS_CHAR (type_id));
- return imrify.combined_ior();
+ return imrify.combined_ior ();
}
}
}
ACE_STATIC_SVC_DEFINE (
ImR_Client_Adapter_Impl,
- ACE_TEXT ("Concrete_ImR_Client_Adapter"),
+ ACE_TEXT_ALWAYS_CHAR ("Concrete_ImR_Client_Adapter"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (ImR_Client_Adapter_Impl),
ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp
index aaadf64e536..81e62a87e35 100644
--- a/TAO/tao/Invocation_Adapter.cpp
+++ b/TAO/tao/Invocation_Adapter.cpp
@@ -73,7 +73,7 @@ namespace TAO
// Although not used explicitly here, constructs
// the retry state that will stub that be used
// when restarting invocation.
- TAO::Invocation_Retry_State retry_state(*stub);
+ TAO::Invocation_Retry_State retry_state (*stub);
while (status == TAO_INVOKE_START || status == TAO_INVOKE_RESTART)
{
diff --git a/TAO/tao/Invocation_Retry_State.cpp b/TAO/tao/Invocation_Retry_State.cpp
index dc3e558c73b..3df2302b748 100644
--- a/TAO/tao/Invocation_Retry_State.cpp
+++ b/TAO/tao/Invocation_Retry_State.cpp
@@ -17,10 +17,12 @@ namespace
{
if (command_line_params.forward_on_exception_limit_[ex] !=
result.forward_on_exception_limit_[ex])
- result.forward_on_exception_limit_[ex] = command_line_params.forward_on_exception_limit_[ex];
+ result.forward_on_exception_limit_[ex] =
+ command_line_params.forward_on_exception_limit_[ex];
else if (client_factory_params.forward_on_exception_limit_[ex] !=
- result.forward_on_exception_limit_[ex])
- result.forward_on_exception_limit_[ex] = client_factory_params.forward_on_exception_limit_[ex];
+ result.forward_on_exception_limit_[ex])
+ result.forward_on_exception_limit_[ex] =
+ client_factory_params.forward_on_exception_limit_[ex];
}
/// Calculate the retry parameters by giving a command line parameter
@@ -42,10 +44,12 @@ namespace
// Retry on reply closed limit
if (command_line_params.forward_on_reply_closed_limit_ !=
result.forward_on_reply_closed_limit_)
- result.forward_on_reply_closed_limit_ = command_line_params.forward_on_reply_closed_limit_;
+ result.forward_on_reply_closed_limit_ =
+ command_line_params.forward_on_reply_closed_limit_;
else if (client_factory_params.forward_on_reply_closed_limit_ !=
- result.forward_on_reply_closed_limit_)
- result.forward_on_reply_closed_limit_ = client_factory_params.forward_on_reply_closed_limit_;
+ result.forward_on_reply_closed_limit_)
+ result.forward_on_reply_closed_limit_ =
+ client_factory_params.forward_on_reply_closed_limit_;
// Forward on exception limits
@@ -86,9 +90,11 @@ TAO::Invocation_Retry_State::Invocation_Retry_State (TAO_Stub &stub)
// Cast away const to avoid tedious iterator operations on the ACE_Array_Map.
TAO::Invocation_Retry_Params &command_line_params =
- const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()->orb_params ()->invocation_retry_params ());
+ const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()
+ ->orb_params ()->invocation_retry_params ());
TAO::Invocation_Retry_Params &client_factory_params =
- const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()->client_factory ()->invocation_retry_params ());
+ const_cast<TAO::Invocation_Retry_Params &> (stub.orb_core ()
+ ->client_factory ()->invocation_retry_params ());
retry_params_calc(command_line_params,
client_factory_params,
@@ -160,7 +166,7 @@ void
TAO::Invocation_Retry_State::sleep_at_starting_profile () const
{
if (stub_.at_starting_profile ())
- this->sleep();
+ this->sleep ();
}
void
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 83bba87452d..65b70e41fd6 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -1109,32 +1109,35 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBForwardOnCommFailureLimit"))))
+ (ACE_TEXT("-ORBForwardOnCommFailureLimit"))))
{
int limit = ACE_OS::atoi (current_arg);
- this->orb_params_.forward_on_exception_limit (TAO::FOE_COMM_FAILURE, limit);
+ this->orb_params_.forward_on_exception_limit (
+ TAO::FOE_COMM_FAILURE, limit);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBForwardOnObjectNotExistLimit"))))
+ (ACE_TEXT("-ORBForwardOnObjectNotExistLimit"))))
{
int limit = ACE_OS::atoi (current_arg);
- this->orb_params_.forward_on_exception_limit (TAO::FOE_OBJECT_NOT_EXIST, limit);
+ this->orb_params_.forward_on_exception_limit (
+ TAO::FOE_OBJECT_NOT_EXIST, limit);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
(ACE_TEXT("-ORBForwardOnInvObjrefLimit"))))
{
int limit = ACE_OS::atoi (current_arg);
- this->orb_params_.forward_on_exception_limit (TAO::FOE_INV_OBJREF, limit);
+ this->orb_params_.forward_on_exception_limit (
+ TAO::FOE_INV_OBJREF, limit);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBForwardOnReplyClosedLimit"))))
+ (ACE_TEXT("-ORBForwardOnReplyClosedLimit"))))
{
int limit = ACE_OS::atoi (current_arg);
- this->orb_params_.invocation_retry_params ().forward_on_reply_closed_limit_ =
- limit;
+ this->orb_params_.invocation_retry_params ()
+ .forward_on_reply_closed_limit_ = limit;
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
@@ -1146,7 +1149,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBForwardOnceOnObjectNotExist"))))
+ (ACE_TEXT("-ORBForwardOnceOnObjectNotExist"))))
{
int forward = ACE_OS::atoi (current_arg);
if (forward)
@@ -1182,14 +1185,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBAllowZIOPNoServerPolicies"))))
+ (ACE_TEXT("-ORBAllowZIOPNoServerPolicies"))))
{
// This option takes a boolean 0 (off/dissallow) or 1 (on/allow)
this->orb_params_.allow_ziop_no_server_policies (!!ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_TEXT("-ORBDynamicThreadPoolName"))))
+ (ACE_TEXT("-ORBDynamicThreadPoolName"))))
{
// This option takes a boolean 0 (off/dissallow) or 1 (on/allow)
this->orb_params_.dynamic_thread_pool_config_name (current_arg);
diff --git a/TAO/tao/PortableServer/LifespanStrategy.h b/TAO/tao/PortableServer/LifespanStrategy.h
index fa1bd321c4d..7b562e8c801 100644
--- a/TAO/tao/PortableServer/LifespanStrategy.h
+++ b/TAO/tao/PortableServer/LifespanStrategy.h
@@ -37,9 +37,9 @@ namespace TAO
public:
LifespanStrategy (void);
- virtual void strategy_init(TAO_Root_POA *poa);
+ virtual void strategy_init (TAO_Root_POA *poa);
- virtual void strategy_cleanup(void);
+ virtual void strategy_cleanup (void);
void create (const char *name, const TAO::ObjectKey &key);
@@ -72,11 +72,11 @@ namespace TAO
/// Check the state of the POA.
virtual void check_state (void) = 0;
- virtual ::PortableServer::LifespanPolicyValue type() const = 0;
+ virtual ::PortableServer::LifespanPolicyValue type () const = 0;
virtual bool use_imr () const = 0;
- virtual CORBA::Object_ptr imr_key_to_object(
+ virtual CORBA::Object_ptr imr_key_to_object (
const TAO::ObjectKey &key,
const char *type_id) const = 0;
diff --git a/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp b/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp
index dd9163217ea..05d7598c293 100644
--- a/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp
+++ b/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp
@@ -120,7 +120,7 @@ namespace TAO
}
}
- LifespanStrategyPersistent::LifespanStrategyPersistent() :
+ LifespanStrategyPersistent::LifespanStrategyPersistent () :
use_imr_ (true)
{
}
@@ -144,13 +144,13 @@ namespace TAO
}
CORBA::Object_ptr
- LifespanStrategyPersistent::imr_key_to_object(const TAO::ObjectKey &key,
- const char *type_id) const
+ LifespanStrategyPersistent::imr_key_to_object (const TAO::ObjectKey &key,
+ const char *type_id) const
{
if (!this->use_imr_)
{
// not using the imr
- return CORBA::Object::_nil();
+ return CORBA::Object::_nil ();
}
// The user specified that the ImR should be used.
@@ -161,7 +161,7 @@ namespace TAO
if (adapter == 0)
{
// couldn't load adapter, already reported error
- return CORBA::Object::_nil();
+ return CORBA::Object::_nil ();
}
return adapter->imr_key_to_object (this->poa_, key, type_id);
diff --git a/TAO/tao/PortableServer/LifespanStrategyTransient.cpp b/TAO/tao/PortableServer/LifespanStrategyTransient.cpp
index a68ca6799bd..afe60a9b338 100644
--- a/TAO/tao/PortableServer/LifespanStrategyTransient.cpp
+++ b/TAO/tao/PortableServer/LifespanStrategyTransient.cpp
@@ -105,8 +105,8 @@ namespace TAO
}
CORBA::Object_ptr
- LifespanStrategyTransient::imr_key_to_object(const TAO::ObjectKey &,
- const char *) const
+ LifespanStrategyTransient::imr_key_to_object (const TAO::ObjectKey &,
+ const char *) const
{
return CORBA::Object::_nil();
}
diff --git a/TAO/tao/PortableServer/LifespanStrategyTransient.h b/TAO/tao/PortableServer/LifespanStrategyTransient.h
index b0e4d634e57..2a811c485c1 100644
--- a/TAO/tao/PortableServer/LifespanStrategyTransient.h
+++ b/TAO/tao/PortableServer/LifespanStrategyTransient.h
@@ -58,8 +58,8 @@ namespace TAO
virtual bool use_imr () const;
- virtual CORBA::Object_ptr imr_key_to_object(const TAO::ObjectKey &key,
- const char *type_id) const;
+ virtual CORBA::Object_ptr imr_key_to_object (const TAO::ObjectKey &key,
+ const char *type_id) const;
private:
TAO::Portable_Server::Creation_Time creation_time_;
diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp
index 4a5de471d87..9a16a689d7d 100644
--- a/TAO/tao/PortableServer/Root_POA.cpp
+++ b/TAO/tao/PortableServer/Root_POA.cpp
@@ -1946,8 +1946,8 @@ TAO_Root_POA::key_to_object (const TAO::ObjectKey &key,
if (indirect && this->orb_core ().imr_endpoints_in_ior ())
{
CORBA::Object_ptr obj = this->active_policy_strategies_.
- lifespan_strategy()->imr_key_to_object(key, type_id);
- if (!CORBA::is_nil(obj))
+ lifespan_strategy()->imr_key_to_object (key, type_id);
+ if (!CORBA::is_nil (obj))
{
return obj;
}
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 76759eb57d3..c9ee90406cf 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -121,7 +121,9 @@ TAO_Stub::add_forward_profiles (const TAO_MProfile &mprofiles,
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::add_forward_profiles, acquired profile lock this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::add_forward_profiles, ")
+ ACE_TEXT ("acquired profile lock this = 0x%x\n"),
+ this));
}
if (permanent_forward)
@@ -171,7 +173,9 @@ TAO_Stub::create_ior_info (IOP::IOR *&ior_info, CORBA::ULong &index)
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::create_ior_info, acquired profile lock this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::create_ior_info, acquired ")
+ ACE_TEXT ("profile lock this = 0x%x\n"),
+ this));
}
@@ -238,7 +242,8 @@ TAO_Stub::object_key (void) const
{
// Double-checked
// FUZZ: disable check_for_ACE_Guard
- ACE_Guard<TAO_SYNCH_MUTEX> obj (const_cast <TAO_SYNCH_MUTEX&>(this->profile_lock_));
+ ACE_Guard<TAO_SYNCH_MUTEX> obj (
+ const_cast <TAO_SYNCH_MUTEX&>(this->profile_lock_));
// FUZZ: enable check_for_ACE_Guard
if (obj.locked () != 0 && this->forward_profiles_ != 0)
@@ -538,7 +543,9 @@ TAO_Stub::marshal (TAO_OutputCDR &cdr)
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::marshal, acquired profile lock this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::marshal, acquired ")
+ ACE_TEXT ("profile lock this = 0x%x\n"),
+ this));
}
diff --git a/TAO/tao/Stub.inl b/TAO/tao/Stub.inl
index ad13c947d4f..714d1d736b2 100644
--- a/TAO/tao/Stub.inl
+++ b/TAO/tao/Stub.inl
@@ -60,7 +60,9 @@ TAO_Stub::reset_profiles (void)
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::reset_profiles, acquired profile lock this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::reset_profiles, acquired ")
+ ACE_TEXT ("profile lock this = 0x%x\n"),
+ this));
}
this->reset_profiles_i ();
@@ -151,7 +153,10 @@ TAO_Stub::next_profile_i (void)
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::next_profile_i, released profile lock to reinitialize this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::next_profile_i, ")
+ ACE_TEXT ("released profile lock to reinitialize ")
+ ACE_TEXT ("this = 0x%x\n"),
+ this));
}
// We may have been forwarded to / from a collocated situation
// Check for this and apply / remove optimisation if required.
@@ -160,7 +165,10 @@ TAO_Stub::next_profile_i (void)
if (TAO_debug_level > 5)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Stub::next_profile_i, reacquired profile lock on object this = 0x%x\n"), this));
+ ACE_TEXT ("TAO (%P|%t) - Stub::next_profile_i, ")
+ ACE_TEXT ("reacquired profile lock on object ")
+ ACE_TEXT ("this = 0x%x\n"),
+ this));
}
}
else
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 54ca5c3573b..60021df9eb6 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -85,8 +85,9 @@ namespace TAO
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_INFO,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "remote_twoway retrying on TRANSIENT exception\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("remote_twoway retrying on TRANSIENT ")
+ ACE_TEXT ("exception\n")));
retry_state->next_profile_retry ();
return TAO_INVOKE_RESTART;
}
@@ -274,8 +275,8 @@ namespace TAO
if (TAO_debug_level > 0 && max_wait_time)
{
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::wait_for_reply, "
- "timeout after recv is <%u> status <%d>\n",
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::wait_for_reply, ")
+ ACE_TEXT ("timeout after recv is <%u> status <%d>\n"),
max_wait_time->msec (),
reply_error));
}
@@ -288,8 +289,9 @@ namespace TAO
if (TAO_debug_level > 3)
{
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::wait_for_reply, "
- "recovering after an error\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("wait_for_reply, ")
+ ACE_TEXT ("recovering after an error\n")));
}
// You the smarty, don't try to moving the unbind_dispatcher
@@ -334,8 +336,9 @@ namespace TAO
{
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "wait_for_reply, forward profile on connection closed\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("wait_for_reply, forward profile on ")
+ ACE_TEXT ("connection closed\n")));
retry_state->next_profile_retry ();
return TAO_INVOKE_RESTART;
}
@@ -417,8 +420,9 @@ namespace TAO
// permanent condition not given
if (TAO_debug_level > 3)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "check_reply_status: unexpected LOCATION_FORWARD_PERM reply\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("check_reply_status: unexpected ")
+ ACE_TEXT ("LOCATION_FORWARD_PERM reply\n")));
throw ::CORBA::INTERNAL (0, CORBA::COMPLETED_NO);
}
@@ -470,8 +474,8 @@ namespace TAO
if (TAO_debug_level > 3)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::location_forward ")
- ACE_TEXT ("being handled\n")));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("location_forward being handled\n")));
}
CORBA::Object_var fwd;
@@ -500,8 +504,8 @@ namespace TAO
if (TAO_debug_level > 3)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "handle_user_exception\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("handle_user_exception\n")));
// Pull the exception from the stream.
CORBA::String_var buf;
@@ -544,8 +548,8 @@ namespace TAO
if (TAO_debug_level > 3)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "handle_system_exception\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("handle_system_exception\n")));
CORBA::String_var type_id;
@@ -632,9 +636,11 @@ namespace TAO
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "handle_system_exception, profile forwarding on exception ",
- type_id.in (), "\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("handle_system_exception, profile forwarding ")
+ ACE_TEXT ("on exception "),
+ type_id.in (),
+ ACE_TEXT ("\n")));
if (do_forward)
this->stub ()->forwarded_on_exception (true);
@@ -694,8 +700,8 @@ namespace TAO
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Twoway_Invocation::"
- "handle_system_exception, about to raise\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Twoway_Invocation::")
+ ACE_TEXT ("handle_system_exception, about to raise\n")));
mon.set_status (TAO_INVOKE_SYSTEM_EXCEPTION);
@@ -752,8 +758,9 @@ namespace TAO
{
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_INFO,
- "TAO (%P|%t) - Synch_Oneway_Invocation::"
- "remote_oneway retrying on TRANSIENT exception\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
+ ACE_TEXT ("remote_oneway retrying on TRANSIENT ")
+ ACE_TEXT ("exception\n")));
retry_state->next_profile_retry ();
return TAO_INVOKE_RESTART;
}
@@ -807,15 +814,15 @@ namespace TAO
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- "TAO (%P|%t) - Synch_Oneway_Invocation::"
- "remote_oneway transport[%d] registration with"
- "reactor returned an error\n",
- transport->id ()));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
+ ACE_TEXT ("remote_oneway transport[%d] registration with")
+ ACE_TEXT ("reactor returned an error\n"),
+ transport->id ()));
}
else
{
// Only set this flag when registration succeeds
- transport->wait_strategy ()->is_registered(true);
+ transport->wait_strategy ()->is_registered (true);
}
}
}
@@ -825,8 +832,8 @@ namespace TAO
{
if (TAO_debug_level > 4)
ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - Synch_Oneway_Invocation::"
- "remote_oneway, queueing message\n"));
+ ACE_TEXT ("TAO (%P|%t) - Synch_Oneway_Invocation::")
+ ACE_TEXT ("remote_oneway, queueing message\n")));
if (transport->format_queue_message (cdr,
max_wait_time,
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index 989ba8ccfc1..5e3044e9b98 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -100,11 +100,13 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
ACE_TEXT("MT_NOUPCALL")) == 0)
this->wait_strategy_ = TAO_WAIT_ON_LF_NO_UPCALL;
else
- this->report_option_value_error (ACE_TEXT("-ORBClientConnectionHandler"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBClientConnectionHandler"), name);
}
}
else if (ACE_OS::strcasecmp (argv[curarg],
- ACE_TEXT("-ORBTransportMuxStrategy")) == 0)
+ ACE_TEXT("-ORBTransportMuxStrategy"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -118,11 +120,13 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
ACE_TEXT("EXCLUSIVE")) == 0)
this->transport_mux_strategy_ = TAO_EXCLUSIVE_TMS;
else
- this->report_option_value_error (ACE_TEXT("-ORBTransportMuxStrategy"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBTransportMuxStrategy"), name);
}
}
else if (ACE_OS::strcasecmp (argv[curarg],
- ACE_TEXT("-ORBTransportMuxStrategyLock")) == 0)
+ ACE_TEXT("-ORBTransportMuxStrategyLock"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -136,7 +140,8 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
ACE_TEXT("thread")) == 0)
this->muxed_strategy_lock_type_ = TAO_THREAD_LOCK;
else
- this->report_option_value_error (ACE_TEXT("-ORBTransportMuxStrategyLock"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBTransportMuxStrategyLock"), name);
}
}
else if (ACE_OS::strcasecmp (argv[curarg],
@@ -157,11 +162,14 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
ACE_TEXT("LF")) == 0)
this->connect_strategy_ = TAO_LEADER_FOLLOWER_CONNECT;
else
- this->report_option_value_error (ACE_TEXT("-ORBConnectStrategy"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBConnectStrategy"),
+ name);
}
}
else if (ACE_OS::strcasecmp (argv[curarg],
- ACE_TEXT("-ORBReplyDispatcherTableSize")) == 0)
+ ACE_TEXT("-ORBReplyDispatcherTableSize"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -184,11 +192,13 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
ACE_OS::strcasecmp (name, ACE_TEXT("true")) == 0)
this->use_cleanup_options_ = true;
else
- this->report_option_value_error (ACE_TEXT("-ORBConnectionHandlerCleanup"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBConnectionHandlerCleanup"), name);
}
}
else if (ACE_OS::strcmp (argv[curarg],
- ACE_TEXT("-ORBForwardOnCommFailureLimit")) == 0)
+ ACE_TEXT("-ORBForwardOnCommFailureLimit"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -199,11 +209,13 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
long limit = ACE_OS::strtol (name, &err, 10);
if (err && *err != 0)
{
- this->report_option_value_error (ACE_TEXT("-ORBForwardOnCommFailureLimit"),
- name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBForwardOnCommFailureLimit"),
+ name);
}
else
- this->invocation_retry_params_.forward_on_exception_limit_[TAO::FOE_COMM_FAILURE] =
+ this->invocation_retry_params_
+ .forward_on_exception_limit_[TAO::FOE_COMM_FAILURE] =
limit;
}
}
@@ -219,16 +231,19 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
long limit = ACE_OS::strtol (name, &err, 10);
if (err && *err != 0)
{
- this->report_option_value_error (ACE_TEXT("-ORBForwardOnTransientLimit"),
- name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBForwardOnTransientLimit"),
+ name);
}
else
- this->invocation_retry_params_.forward_on_exception_limit_[TAO::FOE_TRANSIENT] =
+ this->invocation_retry_params_
+ .forward_on_exception_limit_[TAO::FOE_TRANSIENT] =
limit;
}
}
else if (ACE_OS::strcmp (argv[curarg],
- ACE_TEXT("-ORBForwardOnObjectNotExistLimit")) == 0)
+ ACE_TEXT("-ORBForwardOnObjectNotExistLimit"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -239,11 +254,13 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
long limit = ACE_OS::strtol (name, &err, 10);
if (err && *err != 0)
{
- this->report_option_value_error (ACE_TEXT("-ORBForwardOnObjectNotExistLimit"),
- name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBForwardOnObjectNotExistLimit"),
+ name);
}
else
- this->invocation_retry_params_.forward_on_exception_limit_[TAO::FOE_OBJECT_NOT_EXIST] =
+ this->invocation_retry_params_
+ .forward_on_exception_limit_[TAO::FOE_OBJECT_NOT_EXIST] =
limit;
}
}
@@ -259,15 +276,18 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
long limit = ACE_OS::strtol (name, &err, 10);
if (err && *err != 0)
{
- this->report_option_value_error (ACE_TEXT("-ORBForwardOnInvObjrefLimit"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBForwardOnInvObjrefLimit"), name);
}
else
- this->invocation_retry_params_.forward_on_exception_limit_[TAO::FOE_INV_OBJREF] =
+ this->invocation_retry_params_
+ .forward_on_exception_limit_[TAO::FOE_INV_OBJREF] =
limit;
}
}
else if (ACE_OS::strcmp (argv[curarg],
- ACE_TEXT("-ORBForwardOnReplyClosedLimit")) == 0)
+ ACE_TEXT("-ORBForwardOnReplyClosedLimit"))
+ == 0)
{
curarg++;
if (curarg < argc)
@@ -278,10 +298,12 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
long limit = ACE_OS::strtol (name, &err, 10);
if (err && *err != 0)
{
- this->report_option_value_error (ACE_TEXT("-ORBForwardOnReplyClosedLimit"), name);
+ this->report_option_value_error (
+ ACE_TEXT("-ORBForwardOnReplyClosedLimit"), name);
}
else
- this->invocation_retry_params_.forward_on_reply_closed_limit_ = limit;
+ this->invocation_retry_params_
+ .forward_on_reply_closed_limit_ = limit;
}
}
else if (ACE_OS::strncmp (argv[curarg], ACE_TEXT("-ORB"), 4) == 0)
@@ -306,7 +328,8 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, ACE_TCHAR* argv[])
/// Create the correct client transport muxing strategy.
TAO_Transport_Mux_Strategy *
-TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (TAO_Transport *transport)
+TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (
+ TAO_Transport *transport)
{
TAO_Transport_Mux_Strategy *tms = 0;
@@ -364,13 +387,14 @@ TAO_Default_Client_Strategy_Factory::reply_dispatcher_table_size (void) const
}
TAO_Wait_Strategy *
-TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transport)
+TAO_Default_Client_Strategy_Factory::create_wait_strategy (
+ TAO_Transport *transport)
{
TAO_Wait_Strategy *ws = 0;
/*
- * Hook to customize the wait strategy object when the concrete wait strategy
- * object is known a priori.
+ * Hook to customize the wait strategy object when the concrete
+ * wait strategy object is known a priori.
*/
//@@ WAIT_STRATEGY_SPL_COMMENT_HOOK_START
switch (this->wait_strategy_)
@@ -416,7 +440,8 @@ TAO_Default_Client_Strategy_Factory::connect_strategy (void) const
}
TAO_Connect_Strategy *
-TAO_Default_Client_Strategy_Factory::create_connect_strategy (TAO_ORB_Core *orb_core)
+TAO_Default_Client_Strategy_Factory::create_connect_strategy (
+ TAO_ORB_Core *orb_core)
{
TAO_Connect_Strategy *cs = 0;
@@ -484,7 +509,8 @@ ACE_STATIC_SVC_DEFINE (TAO_Default_Client_Strategy_Factory,
ACE_TEXT ("Client_Strategy_Factory"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (TAO_Default_Client_Strategy_Factory),
- ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
+ ACE_Service_Type::DELETE_THIS |
+ ACE_Service_Type::DELETE_OBJ,
0)
ACE_FACTORY_DEFINE (TAO, TAO_Default_Client_Strategy_Factory)
diff --git a/TAO/utils/logWalker/GIOP_Buffer.cpp b/TAO/utils/logWalker/GIOP_Buffer.cpp
index bd98f5eeedf..c9814c8dbaa 100644
--- a/TAO/utils/logWalker/GIOP_Buffer.cpp
+++ b/TAO/utils/logWalker/GIOP_Buffer.cpp
@@ -228,7 +228,7 @@ GIOP_Buffer::~GIOP_Buffer(void)
}
int
-GIOP_Buffer::add_octets(const char *text, size_t offset)
+GIOP_Buffer::add_octets (const char *text, size_t offset)
{
if (this->octets_ == 0)
{
@@ -238,7 +238,9 @@ GIOP_Buffer::add_octets(const char *text, size_t offset)
const char *c = text;
char *err;
- for (int count = 0; count < 16 && this->cur_size() < this->buffer_size_; count++)
+ for (int count = 0;
+ count < 16 && this->cur_size() < this->buffer_size_;
+ count++)
{
if (count == 8)
++c;
@@ -278,7 +280,7 @@ GIOP_Buffer::sending (void) const
}
bool
-GIOP_Buffer::is_full(void) const
+GIOP_Buffer::is_full (void) const
{
return this->buffer_size_ > 0 && this->cur_size() == this->buffer_size_;
}
@@ -316,7 +318,7 @@ GIOP_Buffer::num_contexts (void) const
}
bool
-GIOP_Buffer::is_oneway(void)
+GIOP_Buffer::is_oneway (void)
{
if (this->octets_ == 0)
{
@@ -348,7 +350,7 @@ GIOP_Buffer::time (void) const
}
const ACE_CString &
-GIOP_Buffer::preamble(void) const
+GIOP_Buffer::preamble (void) const
{
return this->preamble_;
}
@@ -370,13 +372,13 @@ GIOP_Buffer::msg_size (void)
}
size_t
-GIOP_Buffer::expected_req_id(void) const
+GIOP_Buffer::expected_req_id (void) const
{
return this->expected_req_id_;
}
size_t
-GIOP_Buffer::actual_req_id(void)
+GIOP_Buffer::actual_req_id (void)
{
if (this->octets_ == 0)
return 0;
@@ -388,7 +390,7 @@ GIOP_Buffer::actual_req_id(void)
}
size_t
-GIOP_Buffer::cur_size(void) const
+GIOP_Buffer::cur_size (void) const
{
return this->wr_pos_ - this->octets_;
}
@@ -490,7 +492,7 @@ GIOP_Buffer::parse_header (void)
}
const char *
-GIOP_Buffer::target_oid(size_t &len)
+GIOP_Buffer::target_oid (size_t &len)
{
if (this->octets_ == 0)
{
@@ -508,7 +510,7 @@ GIOP_Buffer::target_oid(size_t &len)
}
const char *
-GIOP_Buffer::operation(void)
+GIOP_Buffer::operation (void)
{
if (octets_ == 0)
return 0;
@@ -520,7 +522,7 @@ GIOP_Buffer::operation(void)
}
ACE_InputCDR &
-GIOP_Buffer::payload(void)
+GIOP_Buffer::payload (void)
{
if (octets_ != 0 && !this->header_parsed_)
this->header_parsed_ = this->parse_header();
diff --git a/TAO/utils/logWalker/GIOP_Buffer.h b/TAO/utils/logWalker/GIOP_Buffer.h
index fcc503e2685..fba751b1664 100644
--- a/TAO/utils/logWalker/GIOP_Buffer.h
+++ b/TAO/utils/logWalker/GIOP_Buffer.h
@@ -38,7 +38,10 @@ public:
static const size_t giop_header_len;
static void init_leadin (int version);
- GIOP_Buffer (const char *text, size_t offset, Thread *thread, Invocation *owner = 0);
+ GIOP_Buffer (const char *text,
+ size_t offset,
+ Thread *thread,
+ Invocation *owner = 0);
GIOP_Buffer (void);
~GIOP_Buffer (void);
diff --git a/TAO/utils/nsgroup/nsgroup.cpp b/TAO/utils/nsgroup/nsgroup.cpp
index c9489c4aa14..d2a905c8048 100644
--- a/TAO/utils/nsgroup/nsgroup.cpp
+++ b/TAO/utils/nsgroup/nsgroup.cpp
@@ -41,7 +41,9 @@ show_help(int argc, ACE_TCHAR *argv[])
if (get_opts.long_option (ACE_TEXT ("help"),'h') != 0)
{
- ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT (" Unable to add long option 'H'\n")), true);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT (" Unable to add long option 'H'\n")),
+ true);
}
int c;
@@ -147,7 +149,10 @@ NSGROUP::start_orb (void)
#if 0
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("start_orb::argc(%u)\n"), this->argc_));
for( int i = 0; i < this->argc_; ++i){
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("start_orb::argv(%u:%s)\n"), i, this->argv_[i]));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("start_orb::argv(%u:%s)\n"),
+ i,
+ this->argv_[i]));
}
#endif //
@@ -167,7 +172,7 @@ NSGROUP::start_orb (void)
//
//////////////////////////////////////////////////////////////////////////
CORBA::Object_var naming_manager_object =
- orb_->resolve_initial_references ( ACE_TEXT_ALWAYS_CHAR("NamingManager") );
+ orb_->resolve_initial_references (ACE_TEXT_ALWAYS_CHAR ("NamingManager"));
FT_Naming::NamingManager_var naming_manager_ =
FT_Naming::NamingManager::_narrow (naming_manager_object.in ());
@@ -175,14 +180,15 @@ NSGROUP::start_orb (void)
if (RC_SUCCESS != svc_.set_naming_manager (naming_manager_))
{
ACE_ERROR_RETURN (( LM_ERROR,
- ACE_TEXT (" (%P|%t) Unable to get Naming Manager Reference\n")),
- RC_ERROR);
+ ACE_TEXT (" (%P|%t) Unable to get Naming ")
+ ACE_TEXT ("Manager Reference\n")),
+ RC_ERROR);
}
//////////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////////
CORBA::Object_var naming_object =
- orb_->resolve_initial_references( ACE_TEXT_ALWAYS_CHAR("NameService") );
+ orb_->resolve_initial_references(ACE_TEXT_ALWAYS_CHAR ("NameService"));
CosNaming::NamingContextExt_var name_service_ =
CosNaming::NamingContextExt::_narrow (naming_object.in ());
@@ -190,8 +196,9 @@ NSGROUP::start_orb (void)
if (RC_SUCCESS != svc_.set_name_context (name_service_))
{
ACE_ERROR_RETURN (( LM_ERROR,
- ACE_TEXT (" (%P|%t) Unable to get Name Service Reference\n")),
- RC_ERROR);
+ ACE_TEXT (" (%P|%t) Unable to get Name Service ")
+ ACE_TEXT ("Reference\n")),
+ RC_ERROR);
}
//////////////////////////////////////////////////////////////////////////
//
@@ -281,9 +288,14 @@ NSGROUP::NSGROUP_COMMAND
NSGROUP::parse_command_line (void)
{
#if 0
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("parse_command_line::argc(%u)\n"), this->argc_));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("parse_command_line::argc(%u)\n"),
+ this->argc_));
for( int i = 0; i < this->argc_; ++i){
- ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("parse_command_line::argv(%u:%s)\n"), i, this->argv_[i]));
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("parse_command_line::argv(%u:%s)\n"),
+ i,
+ this->argv_[i]));
}
#endif
@@ -308,39 +320,45 @@ NSGROUP::parse_command_line (void)
'g',
ACE_Get_Opt::ARG_REQUIRED) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'g'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'g'\n")),
+ NSGROUP_NONE);
this->policy_arg_ = 0;
if (get_opts.long_option (ACE_TEXT ("policy"),
'p',
ACE_Get_Opt::ARG_REQUIRED) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'p'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'p'\n")),
+ NSGROUP_NONE);
this->location_arg_ = 0;
if (get_opts.long_option (ACE_TEXT ("location"),
'l',
ACE_Get_Opt::ARG_REQUIRED) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'l'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'l'\n")),
+ NSGROUP_NONE);
this->ior_arg_ = 0;
if (get_opts.long_option (ACE_TEXT ("ior"),
'i',
ACE_Get_Opt::ARG_REQUIRED) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'i'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'i'\n")),
+ NSGROUP_NONE);
this->namepath_arg_ = 0;
if (get_opts.long_option (ACE_TEXT ("name"),
'n',
ACE_Get_Opt::ARG_REQUIRED) != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'n'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'n'\n")),
+ NSGROUP_NONE);
if (get_opts.long_option (ACE_TEXT ("help"), 'h') != 0)
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Unable to add long option 'h'\n")), NSGROUP_NONE);
+ ACE_TEXT ("Unable to add long option 'h'\n")),
+ NSGROUP_NONE);
int c;
while ((c = get_opts ()) != -1)
@@ -374,60 +392,61 @@ NSGROUP::parse_command_line (void)
if( ACE_OS::strncmp (this->argv_[i],ACE_TEXT("group_create"),
- ACE_OS::strlen (ACE_TEXT("group_create"))) == 0 ) {
-
- nsgroup_cmd_ = NSGROUP_GROUP_CREATE;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_bind"),
- ACE_OS::strlen (ACE_TEXT("group_bind"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_GROUP_BIND;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_unbind"),
- ACE_OS::strlen (ACE_TEXT("group_unbind"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_GROUP_UNBIND;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_modify"),
- ACE_OS::strlen (ACE_TEXT("group_modify"))) == 0 ){
-
+ ACE_OS::strlen (ACE_TEXT("group_create"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_GROUP_CREATE;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_bind"),
+ ACE_OS::strlen (ACE_TEXT("group_bind"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_GROUP_BIND;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_unbind"),
+ ACE_OS::strlen (ACE_TEXT("group_unbind")))
+ == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_GROUP_UNBIND;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_modify"),
+ ACE_OS::strlen (ACE_TEXT("group_modify"))) == 0 )
+ {
nsgroup_cmd_ = NSGROUP_GROUP_MODIFY;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_list"),
+ ACE_OS::strlen (ACE_TEXT("group_list"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_GROUP_LIST;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_remove"),
+ ACE_OS::strlen (ACE_TEXT("group_remove"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_GROUP_REMOVE;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_list"),
+ ACE_OS::strlen (ACE_TEXT("member_list"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_MEMBER_LIST;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_add"),
+ ACE_OS::strlen (ACE_TEXT("member_add"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_MEMBER_ADD;
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_remove"),
+ ACE_OS::strlen (ACE_TEXT("member_remove"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_MEMBER_REMOVE;
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_list"),
- ACE_OS::strlen (ACE_TEXT("group_list"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_GROUP_LIST;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("group_remove"),
- ACE_OS::strlen (ACE_TEXT("group_remove"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_GROUP_REMOVE;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_list"),
- ACE_OS::strlen (ACE_TEXT("member_list"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_MEMBER_LIST;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_add"),
- ACE_OS::strlen (ACE_TEXT("member_add"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_MEMBER_ADD;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_remove"),
- ACE_OS::strlen (ACE_TEXT("member_remove"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_MEMBER_REMOVE;
-
- } else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_show"),
- ACE_OS::strlen (ACE_TEXT("member_show"))) == 0 ){
-
- nsgroup_cmd_ = NSGROUP_MEMBER_SHOW;
-
- } else {
-
- nsgroup_cmd_ = NSGROUP_NONE;
-
- }
+ }
+ else if(ACE_OS::strncmp (this->argv_[i], ACE_TEXT("member_show"),
+ ACE_OS::strlen (ACE_TEXT("member_show"))) == 0 )
+ {
+ nsgroup_cmd_ = NSGROUP_MEMBER_SHOW;
+ }
+ else
+ {
+ nsgroup_cmd_ = NSGROUP_NONE;
+ }
}
// The command should be the only non option argument
@@ -440,27 +459,27 @@ NSGROUP::parse_command_line (void)
int
-NSGROUP::show_usage( void )
+NSGROUP::show_usage ( void )
{
const int RC_SUCCESS = 0;
ACE_DEBUG ((LM_INFO,
- ACE_TEXT ("Usage:\n")
- ACE_TEXT (" %s\n")
- ACE_TEXT (" group_create -group <group> -policy <round | rand | least> \n")
- ACE_TEXT (" group_bind -group <group> -name <name>\n")
- ACE_TEXT (" group_unbind -name <name>\n")
- ACE_TEXT (" group_modify -group <group> -policy <round | rand | least> \n")
- ACE_TEXT (" group_list\n")
- ACE_TEXT (" group_remove -group <group>\n")
- ACE_TEXT (" member_list -group <group>\n")
- ACE_TEXT (" member_add -group <group> -location <location> -ior <IOR>\n")
- ACE_TEXT (" member_remove -group <group> -location <location>\n")
- ACE_TEXT (" member_show -group <group> -location <location>\n")
- ACE_TEXT (" -help\n")
- ACE_TEXT ("\n"),
- this->argv_[0]));
- return RC_SUCCESS;
+ ACE_TEXT ("Usage:\n")
+ ACE_TEXT (" %s\n")
+ ACE_TEXT (" group_create -group <group> -policy <round | rand | least> \n")
+ ACE_TEXT (" group_bind -group <group> -name <name>\n")
+ ACE_TEXT (" group_unbind -name <name>\n")
+ ACE_TEXT (" group_modify -group <group> -policy <round | rand | least> \n")
+ ACE_TEXT (" group_list\n")
+ ACE_TEXT (" group_remove -group <group>\n")
+ ACE_TEXT (" member_list -group <group>\n")
+ ACE_TEXT (" member_add -group <group> -location <location> -ior <IOR>\n")
+ ACE_TEXT (" member_remove -group <group> -location <location>\n")
+ ACE_TEXT (" member_show -group <group> -location <location>\n")
+ ACE_TEXT (" -help\n")
+ ACE_TEXT ("\n"),
+ this->argv_[0]));
+ return RC_SUCCESS;
}
@@ -494,7 +513,6 @@ ACE_TMAIN (int argc, ACE_TCHAR *argv[])
ACE_TEXT ("Unable to run %C\n"),
argv[0]),
1);
-
}
return (rc == RC_SUCCESS) ? 0 : 1;
diff --git a/TAO/utils/nsgroup/run_test.pl b/TAO/utils/nsgroup/run_test.pl
index c1070004ec6..a529743fd3f 100755
--- a/TAO/utils/nsgroup/run_test.pl
+++ b/TAO/utils/nsgroup/run_test.pl
@@ -353,6 +353,13 @@ sub run_clients ()
run_nsdel("$DEF_REF"." --name iso --destroy");
+ # Verify we can handle a non-existent ior to add to the list
+ run_nsadd("$DEF_REF --name does_not_exist --ior file://thisfiledoesnotexist");
+ run_nslist("$NS_REF");
+ run_nsdel("$DEF_REF"." --name does_not_exist");
+ run_nslist("$NS_REF");
+
+
run_client (
"-help",
$POSITIVE_TEST_RESULT);