summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-03-12 17:17:01 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-03-12 17:17:01 +0000
commitd9bc2e62e1665c71d3b7ca8cb1c2da4eaa1c22b3 (patch)
treec7ba6cdb47429453dff4a6d80604ef5c1e0e1300
parentcfc6e08944509b5e221a6162702df241f62c4c66 (diff)
downloadATCD-d9bc2e62e1665c71d3b7ca8cb1c2da4eaa1c22b3.tar.gz
ChangeLogTag:Wed Mar 12 09:11:48 2003 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLog37
-rw-r--r--TAO/tao/RTCORBA/RT_ORBInitializer.cpp91
2 files changed, 78 insertions, 50 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index ac737e09acc..93f49650e9e 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,10 @@
+Wed Mar 12 09:11:48 2003 Ossama Othman <ossama@uci.edu>
+
+ * tao/RTCORBA/RT_ORBInitializer.cpp:
+
+ Include "tao/debug.h" to pull in TAO_debug_level global
+ variable declaration.
+
Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* Merge of the dyn_corba CVS branch. The new features included
@@ -11,7 +18,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
- Change of operation dispatch in the IFR from Servant Locator
to Default Servant.
- - Optimizations to the IFR to eliminate data copies and
+ - Optimizations to the IFR to eliminate data copies and
new/delete pairs.
- A new latency/throughput test for the IFR.
@@ -1227,7 +1234,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Any_T.cpp:
In cases where typed extraction fails and interpretive
- extraction must be performed, the constructor of the
+ extraction must be performed, the constructor of the
temporary CDR stream was changed to one that does not
own the underlying message block, thus eliminating a
` duplicate/release pair.
@@ -1744,7 +1751,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* orbsvcs/orbsvcs/IFRService/tmplinst.cpp:
Interface Repository Service implementation files
- modified to comply with the latest OMG
+ modified to comply with the latest OMG
specification (CORBA 3.0). All skeleton files have
been regenerated.
@@ -1779,7 +1786,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
When marshaling an interface union member, replaced a
generated call to the virtual marshal() method with a
- call to the global <flat_name>_marshal() method, if
+ call to the global <flat_name>_marshal() method, if
the interface is not yet defined when it is referenced.
Sat Feb 8 13:15:10 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
@@ -1794,23 +1801,23 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp (valid_content_type):
- Fixed a bug in the unaliasing loop.
+ Fixed a bug in the unaliasing loop.
Mon Feb 3 16:14:27 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp:
Added comments and cosmetic changes to create_recursive_tc().
- Also changed update_map() to use the CDR stream's total
+ Also changed update_map() to use the CDR stream's total
length to get the unaligned offset. Thanks to Matej
Sekoranja <matej.sekoranza@ijs.si> for suggesting this
- last change.
+ last change.
Mon Feb 3 11:30:31 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp (create_recursive_tc):
- Changed ACE_ENV_ARG_DECL_NOT_USED to ACE_ENV_ARG_DECL.
+ Changed ACE_ENV_ARG_DECL_NOT_USED to ACE_ENV_ARG_DECL.
Wed Jan 29 20:47:39 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
@@ -2171,7 +2178,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/RTPortableServer/TAO_RTPortableServer.dsp:
Regenerated hand-crafted files in all TAO satellite libraries,
- modified PIDL files and MSVC project files as needed, and
+ modified PIDL files and MSVC project files as needed, and
fixed a few mistakes in TAO, all relating to the new Any
implementation.
@@ -2492,7 +2499,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Typecode.h:
* tao/Typecode.cpp:
- Completed addition of eventtype typecode support,
+ Completed addition of eventtype typecode support,
also cosmetic changes.
* tao/TypeCodeFactory/TypeCodeFactory_i.cpp:
@@ -2511,7 +2518,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Any.cpp:
- Added explicit template instantiations used in the
+ Added explicit template instantiations used in the
insertion/extraction operators.
* TAO_IDL/be/be_visitor_array/any_op_cs.cpp:
@@ -2557,7 +2564,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* tao/Messaging/MessagingS.cpp:
- Replaced an occurrence of CORBA_InterfaceDef with
+ Replaced an occurrence of CORBA_InterfaceDef with
CORBA::InterfaceDef.
Tue Dec 17 13:06:06 2002 Jeff Parsons <j.parsons@vanderbilt.edu>
@@ -2695,7 +2702,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
New files added to TAO for the template classes of the
revamped Any implementation. The original Any class contains
few spec-required methods but is mostly a container for
- these template classes. Thanks to Carlos O'Ryan
+ these template classes. Thanks to Carlos O'Ryan
<coryan@atdesk.com> for guidance with the design.
* orbsvcs/orbsvcs/IFRService/Servant_Factory.cpp:
@@ -2877,7 +2884,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
POA for each, are created at startup. The object key of
POACurrent is parsed to reconstruct the database key, which
is then plugged into the servant just before the C++ call.
- Also, the skeleton files were regenerated. Now only one
+ Also, the skeleton files were regenerated. Now only one
line in each *S.h file needs to be patched.
* tao/AbstractBase.cpp:
@@ -2915,7 +2922,7 @@ Wed Mar 12 09:49:00 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
implementation and in the IR Object class names. Also,
a virtual marshal() method was added to CORBA::Object to
help detect an attempt to marshal a local interface. Finally,
- a TAO-specific method was added to class TypeCode, which
+ a TAO-specific method was added to class TypeCode, which
returns the content type without making a duplicate.
Similar versions of other TypeCode methods that return
` typecodes will be made in the future, for internal ORB use.
diff --git a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
index 0d37addd1eb..dd7fe4bd959 100644
--- a/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
+++ b/TAO/tao/RTCORBA/RT_ORBInitializer.cpp
@@ -1,10 +1,10 @@
-// -*- C++ -*-
-//
-// $Id$
-
#include "RT_ORBInitializer.h"
-ACE_RCSID (TAO, RT_ORBInitializer, "$Id$")
+
+ACE_RCSID (RTCORBA,
+ RT_ORBInitializer,
+ "$Id$")
+
#define TAO_RTCORBA_SAFE_INCLUDE
#include "tao/RTCORBA/RTCORBAC.h"
@@ -14,9 +14,6 @@ ACE_RCSID (TAO, RT_ORBInitializer, "$Id$")
#include "RT_Protocols_Hooks.h"
#include "Priority_Mapping_Manager.h"
#include "Network_Priority_Mapping_Manager.h"
-#include "tao/Exception.h"
-#include "tao/ORB_Core.h"
-#include "tao/ORBInitInfo.h"
#include "RT_ORB_Loader.h"
#include "RT_Stub_Factory.h"
#include "RT_Endpoint_Selector_Factory.h"
@@ -28,6 +25,11 @@ ACE_RCSID (TAO, RT_ORBInitializer, "$Id$")
#include "RT_Current.h"
#include "RT_Thread_Lane_Resources_Manager.h"
+#include "tao/Exception.h"
+#include "tao/ORB_Core.h"
+#include "tao/ORBInitInfo.h"
+#include "tao/debug.h"
+
#include "ace/Service_Repository.h"
#include "ace/Svc_Conf.h"
#include "ace/Sched_Params.h"
@@ -152,38 +154,42 @@ TAO_RT_ORBInitializer::pre_init (
}
// Set the Priority_Mapping_Manager
- TAO_Network_Priority_Mapping_Manager *network_manager = 0;
+ TAO_Network_Priority_Mapping_Manager * network_manager = 0;
+
+ // @@ There is a potential memory leak here. If the new() below
+ // throws an exception, the memory for the network priority
+ // mapping allocated above will be leaked. Use an auto_ptr<> or
+ // the appropriate memory management tool.
ACE_NEW_THROW_EX (network_manager,
TAO_Network_Priority_Mapping_Manager (npm),
CORBA::NO_MEMORY (
- CORBA::SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- ENOMEM),
- CORBA::COMPLETED_NO));
+ CORBA::SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
ACE_CHECK;
-
- TAO_Network_Priority_Mapping_Manager_var safe_network_manager = network_manager;
+ TAO_Network_Priority_Mapping_Manager_var safe_network_manager =
+ network_manager;
info->register_initial_reference ("NetworkPriorityMappingManager",
network_manager
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- // @@ This is busted. TAO_ORBInitInfo should do proper reference
- // counting.
// Narrow to a TAO_ORBInitInfo object to get access to the
// orb_core() TAO extension.
- TAO_ORBInitInfo_var tao_info = TAO_ORBInitInfo::_narrow (info
- ACE_ENV_ARG_PARAMETER);
+ TAO_ORBInitInfo_var tao_info =
+ TAO_ORBInitInfo::_narrow (info
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
if (CORBA::is_nil (tao_info.in ()))
{
if (TAO_debug_level > 0)
ACE_ERROR ((LM_ERROR,
- "(%P|%t) Security_ORBInitializer::pre_init:\n"
+ "(%P|%t) TAO_RT_ORBInitializer::pre_init:\n"
"(%P|%t) Unable to narrow "
"\"PortableInterceptor::ORBInitInfo_ptr\" to\n"
"(%P|%t) \"TAO_ORBInitInfo *.\"\n"));
@@ -227,14 +233,16 @@ TAO_RT_ORBInitializer::pre_init (
tao_info->orb_core ()->orb_params ()->scope_policy (this->scope_policy_);
- /* We need to store sched_policy_flags_ and not sched_policy_ in the
+ /*
+ * We need to store sched_policy_flags_ and not sched_policy_ in the
* orb_params(), because in TAO_Thread_Lane::create_dynamic_threads(),
* the flags are passed to ACE_Task_Base::activate() in order to set
* the priority.
*/
tao_info->orb_core ()->orb_params ()->sched_policy (this->sched_policy_flags_);
- /* Based on what the scheduling policy is, set the priority to the lowest
+ /*
+ * Based on what the scheduling policy is, set the priority to the lowest
* priority for that scheduling policy. We need to do this in order to
* set the pthread policy for pthread_setschedparam().
* Also, we want the pthread policy and priority to be set to a sensible
@@ -246,22 +254,35 @@ TAO_RT_ORBInitializer::pre_init (
ACE_Thread::self(thr_id);
int result = ACE_OS::thr_getprio(thr_id, priority);
- if ( result != 0 ) {
- ACE_ERROR ((LM_ERROR, "(%N,%l) ACE_OS::thr_getprio failed, priority %d errno: %d %m\n", priority, errno));
- return;
- }
+ if (result != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%N,%l) ACE_OS::thr_getprio failed, "
+ "priority %d errno: %d %m\n",
+ priority,
+ errno));
+ return;
+ }
- int priority_min = ACE_Sched_Params::priority_min(this->sched_policy_);
- int priority_max = ACE_Sched_Params::priority_max(this->sched_policy_);
- if(priority < priority_min || priority > priority_max) { // Check this
- priority = priority_min;
- }
+ const int priority_min =
+ ACE_Sched_Params::priority_min (this->sched_policy_);
+ const int priority_max =
+ ACE_Sched_Params::priority_max (this->sched_policy_);
- result = ACE_OS::thr_setprio(thr_id, priority, this->sched_policy_);
- if ( result != 0 ) {
- ACE_ERROR ((LM_ERROR, "(%N,%l) ACE_OS::thr_setprio failed, priority %d errno: %d %m\n", priority, errno));
- }
+ if (priority < priority_min || priority > priority_max) // Check this
+ {
+ priority = priority_min;
+ }
+ result = ACE_OS::thr_setprio(thr_id, priority, this->sched_policy_);
+ if (result != 0)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "(%N,%l) ACE_OS::thr_setprio failed, "
+ "priority %d errno: %d %m\n",
+ priority,
+ errno));
+ }
}
void