summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a462
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp6
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp4
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp15
-rw-r--r--TAO/tao/IIOP_Profile.cpp21
-rw-r--r--TAO/tao/IOPC.cpp36
-rw-r--r--TAO/tao/IOPC.h12
-rw-r--r--TAO/tao/MessagingC.cpp12
-rw-r--r--TAO/tao/MessagingC.h8
-rw-r--r--TAO/tao/ORB.cpp20
-rw-r--r--TAO/tao/SHMIOP_Acceptor.cpp5
-rw-r--r--TAO/tao/SHMIOP_Profile.cpp33
-rw-r--r--TAO/tao/Sequence.cpp45
-rw-r--r--TAO/tao/Sequence.h6
-rw-r--r--TAO/tao/Sequence.i56
-rw-r--r--TAO/tao/Services.cpp12
-rw-r--r--TAO/tao/Services.h4
-rw-r--r--TAO/tao/UIOP_Acceptor.cpp5
-rw-r--r--TAO/tao/UIOP_Profile.cpp32
-rw-r--r--TAO/tao/orbconf.h6
-rw-r--r--TAO/tests/OctetSeq/OctetSeq.cpp6
-rw-r--r--TAO/tests/OctetSeq/client.cpp3
-rw-r--r--TAO/tests/OctetSeq/server.cpp68
-rw-r--r--TAO/tests/OctetSeq/test_i.cpp9
-rw-r--r--TAO/tests/OctetSeq/test_i.h3
25 files changed, 529 insertions, 360 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 0b1fbda9a4e..cdde2b64f1f 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,55 +1,113 @@
+Thu Jun 29 11:28:04 2000 Carlos O'Ryan <coryan@uci.edu>
+
+ * tao/orbconf.h:
+ Changed the TAO_NO_COPY_OCTET_SEQUENCES macro to work as all the
+ other macros in TAO, i.e. it is defined to either 0 or 1 to
+ disable or enable the optimization.
+
+ * TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp:
+ * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp:
+ Generate code that uses #if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+ instead of #if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+
+ * tao/Sequence.h:
+ * tao/Sequence.i:
+ * tao/Sequence.cpp:
+ Change the specialization of
+ TAO_Unbounded_Sequence<CORBA::Octet> to work when
+ TAO_NO_COPY_OCTET_SEQUENCES is disabled. This is needed because
+ some components in the ORB rely on it.
+
+ * tao/ORB.cpp:
+ Never instantiate the TAO_Unbounded_Sequence<CORBA::Octet>
+ class. It is specialized all the time.
+
+ * tao/IIOP_Acceptor.cpp:
+ * tao/IIOP_Profile.cpp:
+ * tao/SHMIOP_Acceptor.cpp:
+ * tao/SHMIOP_Profile.cpp:
+ * tao/UIOP_Acceptor.cpp:
+ * tao/UIOP_Profile.cpp:
+ Modify it to work when TAO_NO_COPY_OCTET_SEQUENCES is disabled.
+
+ * tao/IOPC.h:
+ * tao/IOPC.cpp:
+ * tao/MessagingC.h:
+ * tao/MessagingC.cpp:
+ * tao/Services.h:
+ * tao/Services.cpp:
+ Change the protections for TAO_NO_COPY_OCTET_SEQUENCES from #if
+ defined() to #if (XXX == 1)
+
+ * tests/OctetSeq/OctetSeq.cpp:
+ Modify it to work when TAO_NO_COPY_OCTET_SEQUENCES is disabled.
+
+ * tests/OctetSeq/client.cpp:
+ Destroy the ORB to avoid memory leaks and detect problems with
+ memory management.
+
+ * tests/OctetSeq/server.cpp:
+ The Database_i object must be declared in a nested scope,
+ otherwise the ORB is destroyed before the octet sequences
+ contained in the database object.
+
+ * tests/OctetSeq/test_i.h:
+ * tests/OctetSeq/test_i.cpp:
+ Add destructor to avoid memory leak.
+ Modify it to work when TAO_NO_COPY_OCTET_SEQUENCES is disabled.
+
Thu Jun 29 00:12:04 2000 Marina Spivak <marina@cs.wustl.edu>
- * tao/Makefile.bor:
+ * tao/Makefile.bor:
- Added Priority_Mapping_Manager.
+ Added Priority_Mapping_Manager.
Wed Jun 28 15:50:37 2000 Nanbor Wang <nanbor@cs.wustl.edu>
- * tao/IORC.cpp (_unchecked_narrow): Removed smart proxies code
- from the generated code. We don't need smart proxy stuff in
- this file. It was causing compilation errors when compiling
- with smart proxies enable.
+ * tao/IORC.cpp (_unchecked_narrow): Removed smart proxies code
+ from the generated code. We don't need smart proxy stuff in
+ this file. It was causing compilation errors when compiling
+ with smart proxies enable.
Wed Jun 28 12:19:36 2000 Carlos O'Ryan <coryan@uci.edu>
- * docs/tutorials/Quoter/Naming_Service/Naming_Service.dsw:
- * docs/tutorials/Quoter/Naming_Service/client.cpp:
- * docs/tutorials/Quoter/Naming_Service/client.dsp:
- * docs/tutorials/Quoter/Naming_Service/index.html:
- * docs/tutorials/Quoter/Naming_Service/server.cpp:
- * docs/tutorials/Quoter/Naming_Service/server.dsp:
- * docs/tutorials/Quoter/Simple/Simple.dsw:
- * docs/tutorials/Quoter/Simple/Client/client.cpp:
- * docs/tutorials/Quoter/Simple/Client/client.dsp:
- * docs/tutorials/Quoter/Simple/Impl-Repo/server.cpp:
- * docs/tutorials/Quoter/Simple/Impl-Repo/server.dsp:
- * docs/tutorials/Quoter/Simple/ImprovedServer/Stock_Factory_i.h:
- * docs/tutorials/Quoter/Simple/ImprovedServer/Stock_i.h:
- * docs/tutorials/Quoter/Simple/ImprovedServer/improvedserver.dsp:
- * docs/tutorials/Quoter/Simple/ImprovedServer/server.cpp:
- * docs/tutorials/Quoter/Simple/Persistent/index.html:
- * docs/tutorials/Quoter/Simple/Persistent/server.cpp:
- * docs/tutorials/Quoter/Simple/Persistent/server.dsp:
- * docs/tutorials/Quoter/Simple/Server/server.cpp:
- * docs/tutorials/Quoter/Simple/Server/server.dsp:
- Add project files for MSVC.
- Fixed several minor problems detected by the MSVC compiler.
+ * docs/tutorials/Quoter/Naming_Service/Naming_Service.dsw:
+ * docs/tutorials/Quoter/Naming_Service/client.cpp:
+ * docs/tutorials/Quoter/Naming_Service/client.dsp:
+ * docs/tutorials/Quoter/Naming_Service/index.html:
+ * docs/tutorials/Quoter/Naming_Service/server.cpp:
+ * docs/tutorials/Quoter/Naming_Service/server.dsp:
+ * docs/tutorials/Quoter/Simple/Simple.dsw:
+ * docs/tutorials/Quoter/Simple/Client/client.cpp:
+ * docs/tutorials/Quoter/Simple/Client/client.dsp:
+ * docs/tutorials/Quoter/Simple/Impl-Repo/server.cpp:
+ * docs/tutorials/Quoter/Simple/Impl-Repo/server.dsp:
+ * docs/tutorials/Quoter/Simple/ImprovedServer/Stock_Factory_i.h:
+ * docs/tutorials/Quoter/Simple/ImprovedServer/Stock_i.h:
+ * docs/tutorials/Quoter/Simple/ImprovedServer/improvedserver.dsp:
+ * docs/tutorials/Quoter/Simple/ImprovedServer/server.cpp:
+ * docs/tutorials/Quoter/Simple/Persistent/index.html:
+ * docs/tutorials/Quoter/Simple/Persistent/server.cpp:
+ * docs/tutorials/Quoter/Simple/Persistent/server.dsp:
+ * docs/tutorials/Quoter/Simple/Server/server.cpp:
+ * docs/tutorials/Quoter/Simple/Server/server.dsp:
+ Add project files for MSVC.
+ Fixed several minor problems detected by the MSVC compiler.
Wed Jun 28 14:00:33 2000 Marina Spivak <marina@cs.wustl.edu>
- * tao/ORB_Core.cpp:
+ * tao/ORB_Core.cpp:
- Protected RTCORBA specific code with if (TAO_HAS_RT_CORBA == 1).
+ Protected RTCORBA specific code with if (TAO_HAS_RT_CORBA == 1).
- * tao/RT_Policy_i.cpp:
+ * tao/RT_Policy_i.cpp:
- Fixed warnings about not initializing CORBA::LocalObject
- superclass in copy constructors.
+ Fixed warnings about not initializing CORBA::LocalObject
+ superclass in copy constructors.
- * peformance-tests/RTCorba/Orb_Per_Priority/server.cpp
+ * peformance-tests/RTCorba/Orb_Per_Priority/server.cpp
- Fixed compile errors.
+ Fixed compile errors.
Wed Jun 28 12:49:30 2000 Nanbor Wang <nanbor@cs.wustl.edu>
@@ -59,108 +117,108 @@ Wed Jun 28 12:49:30 2000 Nanbor Wang <nanbor@cs.wustl.edu>
Wed Jun 28 10:36:19 2000 Jeff Parsons <parsons@cs.wustl.edu>
- * tao.IORC.h:
- * tao/IORC.i:
- Added missing TAO_Export macros that I had left out of
- recent regeneration, and removed the ostream operators
- for the exceptions, since they had also been removed
- from the previous regeneration. Thanks to Aniruddha
- Gokhale <gokhale@research.bell-labs.com>, Rudynell
- Millian <rmillian@lucent.com> et al for pointing out
- the missing macros.
+ * tao.IORC.h:
+ * tao/IORC.i:
+ Added missing TAO_Export macros that I had left out of
+ recent regeneration, and removed the ostream operators
+ for the exceptions, since they had also been removed
+ from the previous regeneration. Thanks to Aniruddha
+ Gokhale <gokhale@research.bell-labs.com>, Rudynell
+ Millian <rmillian@lucent.com> et al for pointing out
+ the missing macros.
Tue Jun 27 23:27:46 2000 Marina Spivak <marina@cs.wustl.edu>
- * tao/RT_Current.h:
+ * tao/RT_Current.h:
- Removed MSVC "inherited via dominance" warnings.
+ Removed MSVC "inherited via dominance" warnings.
Tue Jun 27 00:44:42 2000 Marina Spivak <marina@cs.wustl.edu>
- * tao/TAOC.h
- * tao/Priority_Mapping_Manager.h
- * tao/Priority_Mapping_Manager.i
- * tao/Priority_Mapping_Manager.cpp:
-
- Added new pseudo object TAO::PriorityMappingManager, which can
- be obtained by invoking
- ORB::resolve_initial_references ("PriorityMappingManager").
-
- TAO::PriorityMappingManager allows application programmer to set/
- obtain the Priority Mapping used by the orb. This is a
- TAO-specific interface (hence TAO scope): the spec requires the
- functionality but does not define the interface. For
- more information refer to RTCORBA specification.
-
- Example of using TAO::ProrityMappingManager to obtain ORB's
- priority mapping can be found in:
- tests/Endpoint_Per_Priority/client.cpp
-
- TAO::PriorityMappingManager can be used to set priority mapping
- used by the orb:
- - mapping class must derive from RTCORBA::PriorityMapping, i.e,
- TAO_Priority_Mapping
- - mapping object must be dynamically allocated, and its
- ownership surrendered to the mapping manager
+ * tao/TAOC.h
+ * tao/Priority_Mapping_Manager.h
+ * tao/Priority_Mapping_Manager.i
+ * tao/Priority_Mapping_Manager.cpp:
+
+ Added new pseudo object TAO::PriorityMappingManager, which can
+ be obtained by invoking
+ ORB::resolve_initial_references ("PriorityMappingManager").
+
+ TAO::PriorityMappingManager allows application programmer to set/
+ obtain the Priority Mapping used by the orb. This is a
+ TAO-specific interface (hence TAO scope): the spec requires the
+ functionality but does not define the interface. For
+ more information refer to RTCORBA specification.
+
+ Example of using TAO::ProrityMappingManager to obtain ORB's
+ priority mapping can be found in:
+ tests/Endpoint_Per_Priority/client.cpp
+
+ TAO::PriorityMappingManager can be used to set priority mapping
+ used by the orb:
+ - mapping class must derive from RTCORBA::PriorityMapping, i.e,
+ TAO_Priority_Mapping
+ - mapping object must be dynamically allocated, and its
+ ownership surrendered to the mapping manager
- mapping class can be user-defined or TAO-provided
- * tao/ORB.cpp
- * tao/ORB.h
- * tao/ORB.i
- * tao/ORB_Core.cpp
- * tao/ORB_Core.h
- * tao/ORB_Core.i
- * tao/orbconf.h:
-
- The following objects are now available from
- <resolve_initial_references>:
- - RTCORBA::RTORB
- - RTCORBA::Current
- - TAO::PriorityMappingManager
-
- * tao/RT_Current.h
- * tao/RT_Mutex.cpp
- * tao/RT_Mutex.h
- * tao/RT_ORB.h
- * tao/RT_Policy_i.cpp
- * tao/RT_Policy_i.h:
-
- Fixed all local interface implementations in the files above to
- inherit from CORBA::LocalObject (per CCM spec). Since
- CORBA::LocalObject's <add_ref> and <remove_ref> are no-ops,
- overriden them to provide reference counting for all objects
- that need it, i.e, in all policies and mutex implementations.
-
- * tao/Pool_Per_Endpoint.cpp
-
- Updated to use TAO::PriorityMappingManager.
-
- * peformance-tests/RTCorba/Multiple_Endpoints/client.cpp
- * peformance-tests/RTCorba/Single_Endpoint/client.cpp
- * peformance-tests/RTCorba/Orb_Per_Priority/client.cpp
- * peformance-tests/RTCorba/Orb_Per_Priority/server.cpp
- * tests/Endpoint_Per_Priority/client.cpp
-
- Updated these tests to use new TAO::PriorityMappingManager
- interface mentioned above.
-
- * peformance-tests/RTCorba/Multiple_Endpoints/Makefile
- * peformance-tests/RTCorba/Single_Endpoint/Makefile
- * peformance-tests/RTCorba/Orb_Per_Priority/Makefile
- * tests/Endpoint_Per_Priority/Makefile
- * tao/Makefile:
- * tao/TAO.dsp
- * tao/TAO_Static.dsp
-
- Updated dependencies.
+ * tao/ORB.cpp
+ * tao/ORB.h
+ * tao/ORB.i
+ * tao/ORB_Core.cpp
+ * tao/ORB_Core.h
+ * tao/ORB_Core.i
+ * tao/orbconf.h:
+
+ The following objects are now available from
+ <resolve_initial_references>:
+ - RTCORBA::RTORB
+ - RTCORBA::Current
+ - TAO::PriorityMappingManager
+
+ * tao/RT_Current.h
+ * tao/RT_Mutex.cpp
+ * tao/RT_Mutex.h
+ * tao/RT_ORB.h
+ * tao/RT_Policy_i.cpp
+ * tao/RT_Policy_i.h:
+
+ Fixed all local interface implementations in the files above to
+ inherit from CORBA::LocalObject (per CCM spec). Since
+ CORBA::LocalObject's <add_ref> and <remove_ref> are no-ops,
+ overriden them to provide reference counting for all objects
+ that need it, i.e, in all policies and mutex implementations.
+
+ * tao/Pool_Per_Endpoint.cpp
+
+ Updated to use TAO::PriorityMappingManager.
+
+ * peformance-tests/RTCorba/Multiple_Endpoints/client.cpp
+ * peformance-tests/RTCorba/Single_Endpoint/client.cpp
+ * peformance-tests/RTCorba/Orb_Per_Priority/client.cpp
+ * peformance-tests/RTCorba/Orb_Per_Priority/server.cpp
+ * tests/Endpoint_Per_Priority/client.cpp
+
+ Updated these tests to use new TAO::PriorityMappingManager
+ interface mentioned above.
+
+ * peformance-tests/RTCorba/Multiple_Endpoints/Makefile
+ * peformance-tests/RTCorba/Single_Endpoint/Makefile
+ * peformance-tests/RTCorba/Orb_Per_Priority/Makefile
+ * tests/Endpoint_Per_Priority/Makefile
+ * tao/Makefile:
+ * tao/TAO.dsp
+ * tao/TAO_Static.dsp
+
+ Updated dependencies.
Tue Jun 27 15:15:07 2000 Nanbor Wang <nanbor@cs.wustl.edu>
- * tao/Client_Priority_Policy.cpp:
- * tao/Buffering_Constraint_Policy.cpp: Some version of g++
- complained that LocalObject should be initialized explicitly in
- copy ctor. Just added them in copy ctor.
+ * tao/Client_Priority_Policy.cpp:
+ * tao/Buffering_Constraint_Policy.cpp: Some version of g++
+ complained that LocalObject should be initialized explicitly in
+ copy ctor. Just added them in copy ctor.
Tue Jun 27 14:35:54 2000 Nanbor Wang <nanbor@cs.wustl.edu>
@@ -172,109 +230,109 @@ Tue Jun 27 14:35:54 2000 Nanbor Wang <nanbor@cs.wustl.edu>
Tue Jun 27 12:50:39 2000 Jeff Parsons <parsons@cs.wustl.edu>
- * TAO_IDL/ast/ast_interface.cpp:
-
- If an interface is forward declared in a module and
- then fully defined in a reopened instance of that
- module, the IDL compiler may, in some cases,
- consider the two module instances to be different
- scopes (for example, if one of them is included from
- another IDL file). In a case like this, the
- AST_Interface::redefine() method, called by
- AST_Interface::forward_redefinition_helper(), was not
- updating the 'defined_in' member, leading to lookup
- errors for references inside the interface definition.
- The scope update has now been added. Thanks to
- Richard Reitmeyer <richard@verecomm.com> for reporting
- this bug and sending in an example pair of IDL files.
+ * TAO_IDL/ast/ast_interface.cpp:
+
+ If an interface is forward declared in a module and
+ then fully defined in a reopened instance of that
+ module, the IDL compiler may, in some cases,
+ consider the two module instances to be different
+ scopes (for example, if one of them is included from
+ another IDL file). In a case like this, the
+ AST_Interface::redefine() method, called by
+ AST_Interface::forward_redefinition_helper(), was not
+ updating the 'defined_in' member, leading to lookup
+ errors for references inside the interface definition.
+ The scope update has now been added. Thanks to
+ Richard Reitmeyer <richard@verecomm.com> for reporting
+ this bug and sending in an example pair of IDL files.
Tue Jun 27 10:09:08 2000 Jeff Parsons <parsons@cs.wustl.edu>
- * TAO_IDL/be/be_interface.cpp:
- * TAO_IDL/be/be_interface_fwd.cpp:
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_interface_fwd.cpp:
- Recent addition of a cast operator for TAO_Object_Manager
- to _var has caused the inline definition of the _var
- constructor from pointer to come too late. Even if it
- is defined at the occurrence of a forward declaration
- of the interface, aggessively inlining compilers will
- complain. Therefore, the definition of this constructor
- has been moved to the header file. This problem was
- uncovered by g++ warnings when compiling generated
- code.
+ Recent addition of a cast operator for TAO_Object_Manager
+ to _var has caused the inline definition of the _var
+ constructor from pointer to come too late. Even if it
+ is defined at the occurrence of a forward declaration
+ of the interface, aggessively inlining compilers will
+ complain. Therefore, the definition of this constructor
+ has been moved to the header file. This problem was
+ uncovered by g++ warnings when compiling generated
+ code.
Tue Jun 27 09:44:32 2000 Jeff Parsons <parsons@cs.wustl.edu>
- * tao/Any.cpp:
- * tao/NVList.cpp:
+ * tao/Any.cpp:
+ * tao/NVList.cpp:
- Added some missing .in()s when CORBA::Any's type_
- member is referenced, since it is now a
- TypeCode_var.
+ Added some missing .in()s when CORBA::Any's type_
+ member is referenced, since it is now a
+ TypeCode_var.
Mon Jun 26 23:56:26 2000 Ossama Othman <ossama@uci.edu>
- * examples/Content_Server/SMI_Iterator/Makefile:
- * examples/Content_Server/AMI_Iterator/Makefile:
+ * examples/Content_Server/SMI_Iterator/Makefile:
+ * examples/Content_Server/AMI_Iterator/Makefile:
- Updated client and server file lists. Some object files were
- unnecessarily linked into the client and/or the server.
+ Updated client and server file lists. Some object files were
+ unnecessarily linked into the client and/or the server.
- * examples/Content_Server/SMI_Iterator/SMI_Iterator.dsw:
- * examples/Content_Server/AMI_Iterator/AMI_Iterator.dsw:
- * examples/Content_Server/AMI_Observer/AMI_Observer.dsw:
+ * examples/Content_Server/SMI_Iterator/SMI_Iterator.dsw:
+ * examples/Content_Server/AMI_Iterator/AMI_Iterator.dsw:
+ * examples/Content_Server/AMI_Observer/AMI_Observer.dsw:
- Added new MSVC++ workspace files.
+ Added new MSVC++ workspace files.
- * examples/Content_Server/SMI_Iterator/server.dsp:
- * examples/Content_Server/SMI_Iterator/client.dsp:
+ * examples/Content_Server/SMI_Iterator/server.dsp:
+ * examples/Content_Server/SMI_Iterator/client.dsp:
- Corrected include/library paths, and source file lists.
+ Corrected include/library paths, and source file lists.
- * examples/Content_Server/AMI_Iterator/server.dsp:
- * examples/Content_Server/AMI_Iterator/client.dsp:
- * examples/Content_Server/AMI_Observer/server.dsp:
- * examples/Content_Server/AMI_Observer/client.dsp:
+ * examples/Content_Server/AMI_Iterator/server.dsp:
+ * examples/Content_Server/AMI_Iterator/client.dsp:
+ * examples/Content_Server/AMI_Observer/server.dsp:
+ * examples/Content_Server/AMI_Observer/client.dsp:
- New MSVC++ project files.
+ New MSVC++ project files.
- * examples/Content_Server/SMI_Iterator/Content_Iterator_i.h:
- * examples/Content_Server/AMI_Iterator/Content_Iterator_i.h:
- * examples/Content_Server/AMI_Iterator/Iterator_Handler.h:
- * examples/Content_Server/AMI_Observer/Callback_Handler.h:
- * examples/Content_Server/AMI_Observer/Callback_i.h:
- * examples/Content_Server/AMI_Iterator/Push_Iterator_Handler.h:
+ * examples/Content_Server/SMI_Iterator/Content_Iterator_i.h:
+ * examples/Content_Server/AMI_Iterator/Content_Iterator_i.h:
+ * examples/Content_Server/AMI_Iterator/Iterator_Handler.h:
+ * examples/Content_Server/AMI_Observer/Callback_Handler.h:
+ * examples/Content_Server/AMI_Observer/Callback_i.h:
+ * examples/Content_Server/AMI_Iterator/Push_Iterator_Handler.h:
- Added preprocessor pragma to surpress "dominance" warnings from
- MSVC++. It is being a bit too paranoid.
+ Added preprocessor pragma to surpress "dominance" warnings from
+ MSVC++. It is being a bit too paranoid.
- * examples/Content_Server/SMI_Iterator/Web_Server.dsw:
+ * examples/Content_Server/SMI_Iterator/Web_Server.dsw:
- Removed this file. It has been superseded by
- "SMI_Iterator.dsw."
+ Removed this file. It has been superseded by
+ "SMI_Iterator.dsw."
Mon Jun 26 16:50:59 2000 Jeff Parsons <parsons@cs.wustl.edu>
- * tao/DomainC.h:
- * tao/DomainC.i:
- * tao/InterceptorC.h:
- * tao/InterceptorC.i:
- * tao/PolicyC.h:
- * tao/PolicyC.i:
- * tao/diffs/InterceptorC.h.diff:
- * tao/diffs/PolicyC.h.diff:
-
- Because of the recently added cast operator for
- TAO_Object_Manager, there were some inline
- problems with these generated files. To fix it,
- some _var constructors were inlined in the .h
- file and removed from the .i file. The diff files
- were modified accordingly.
-
- * tao/diffs/InterceptorC.i.diff:
- * tao/diffs/PolicyC.i.diff:
-
- New diff files added.
+ * tao/DomainC.h:
+ * tao/DomainC.i:
+ * tao/InterceptorC.h:
+ * tao/InterceptorC.i:
+ * tao/PolicyC.h:
+ * tao/PolicyC.i:
+ * tao/diffs/InterceptorC.h.diff:
+ * tao/diffs/PolicyC.h.diff:
+
+ Because of the recently added cast operator for
+ TAO_Object_Manager, there were some inline
+ problems with these generated files. To fix it,
+ some _var constructors were inlined in the .h
+ file and removed from the .i file. The diff files
+ were modified accordingly.
+
+ * tao/diffs/InterceptorC.i.diff:
+ * tao/diffs/PolicyC.i.diff:
+
+ New diff files added.
Mon Jun 26 16:45:49 2000 David L. Levine <levine@cs.wustl.edu>
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
index 87246236ee2..a2647093471 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
@@ -303,7 +303,7 @@ be_visitor_sequence_cdr_op_cs::visit_predefined_type (be_predefined_type *node)
if (node->pt () == AST_PredefinedType::PT_octet && sequence->unbounded ())
{
- *os << "\n#if defined (TAO_NO_COPY_OCTET_SEQUENCES)" << be_nl;
+ *os << "\n#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)" << be_nl;
switch (this->ctx_->sub_state ())
{
case TAO_CodeGen::TAO_CDR_INPUT:
@@ -350,7 +350,7 @@ be_visitor_sequence_cdr_op_cs::visit_predefined_type (be_predefined_type *node)
"bad sub state\n"),
-1);
}
- *os << "\n#else /* TAO_NO_COPY_OCTET_SEQUENCES */" << be_nl;
+ *os << "\n#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */" << be_nl;
}
*os << "return strm.";
@@ -452,7 +452,7 @@ be_visitor_sequence_cdr_op_cs::visit_predefined_type (be_predefined_type *node)
*os << "_tao_sequence.length ());" << be_uidt_nl;
if (node->pt () == AST_PredefinedType::PT_octet && sequence->unbounded ())
- *os << "\n#endif /* TAO_NO_COPY_OCTET_SEQUENCES */" << be_nl;
+ *os << "\n#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */" << be_nl;
return 0;
}
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
index f141a087aac..5d38c72ab52 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp
@@ -406,14 +406,14 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node)
&& node->unbounded ())
{
*os << "\n"
- << "#if defined(TAO_NO_COPY_OCTET_SEQUENCES)" << be_nl
+ << "#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)" << be_nl
<< node->local_name () << " (" << be_idt << be_idt_nl
<< "CORBA::ULong length," << be_nl
<< "const ACE_Message_Block* mb" << be_uidt_nl
<< ")" << be_uidt_nl
<< " : " << node->instance_name ()
<< " (length, mb) {}" << "\n"
- << "#endif /* TAO_NO_COPY_OCTET_SEQUENCE */\n\n";
+ << "#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */\n\n";
}
os->decr_indent ();
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 6247d772363..19d0973be17 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -486,12 +486,17 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
TAO_ObjectKey &object_key)
{
// Create the decoding stream from the encapsulation in the buffer,
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
TAO_InputCDR cdr (profile.profile_data.mb ());
+#else
+ TAO_InputCDR cdr (ACE_reinterpret_cast(char*,profile.profile_data.get_buffer ()),
+ profile.profile_data.length ());
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
CORBA::Octet major, minor;
-
+
// Read the version. We just read it here. We don't*do any*
- // processing.
+ // processing.
if (!(cdr.read_octet (major)
&& cdr.read_octet (minor)))
{
@@ -504,7 +509,7 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
}
return -1;
}
-
+
CORBA::String_var host;
CORBA::UShort port = 0;
@@ -520,11 +525,11 @@ TAO_IIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
}
return -1;
}
-
+
// ... and object key.
if ((cdr >> object_key) == 0)
return -1;
-
+
// We are NOT bothered about the rest.
return 1;
diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp
index cea4fc9f718..60815928e53 100644
--- a/TAO/tao/IIOP_Profile.cpp
+++ b/TAO/tao/IIOP_Profile.cpp
@@ -480,11 +480,26 @@ TAO_IIOP_Profile::create_tagged_profile (void)
// Create the profile body
this->create_profile_body (encap);
+ CORBA::ULong length =
+ ACE_static_cast(CORBA::ULong,encap.total_length ());
+
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
// Place the message block in to the Sequence of Octets that we
// have
- this->tagged_profile_.profile_data.replace (
- (CORBA::ULong) encap.total_length (),
- encap.begin ());
+ this->tagged_profile_.profile_data.replace (length,
+ encap.begin ());
+#else
+ this->tagged_profile_.profile_data.length (length);
+ CORBA::Octet *buffer =
+ this->tagged_profile_.profile_data.get_buffer ();
+ for (const ACE_Message_Block *i = encap.begin ();
+ i != encap.end ();
+ i = i->next ())
+ {
+ ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ());
+ buffer += i->length ();
+ }
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
}
return this->tagged_profile_;
diff --git a/TAO/tao/IOPC.cpp b/TAO/tao/IOPC.cpp
index 4833f01301c..4eb1bec8a55 100644
--- a/TAO/tao/IOPC.cpp
+++ b/TAO/tao/IOPC.cpp
@@ -1371,7 +1371,7 @@ CORBA::Boolean operator<< (
{
// encode all elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
ACE_dynamic_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (IOP::TaggedProfile::_tao_seq_Octet *)&_tao_sequence);
@@ -1381,10 +1381,10 @@ CORBA::Boolean operator<< (
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -1401,7 +1401,7 @@ CORBA::Boolean operator>> (
_tao_sequence.length (_tao_seq_len);
// retrieve all the elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
@@ -1414,10 +1414,10 @@ CORBA::Boolean operator>> (
else
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -1466,7 +1466,7 @@ CORBA::Boolean operator<< (
{
// encode all elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
ACE_dynamic_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (IOP::TaggedComponent::_tao_seq_Octet *)&_tao_sequence);
@@ -1476,10 +1476,10 @@ CORBA::Boolean operator<< (
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -1496,7 +1496,7 @@ CORBA::Boolean operator>> (
_tao_sequence.length (_tao_seq_len);
// retrieve all the elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
@@ -1509,10 +1509,10 @@ CORBA::Boolean operator>> (
else
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -1561,7 +1561,7 @@ CORBA::Boolean operator<< (
{
// encode all elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
ACE_dynamic_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (IOP::ServiceContext::_tao_seq_Octet *)&_tao_sequence);
@@ -1571,10 +1571,10 @@ CORBA::Boolean operator<< (
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -1591,7 +1591,7 @@ CORBA::Boolean operator>> (
_tao_sequence.length (_tao_seq_len);
// retrieve all the elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
@@ -1604,10 +1604,10 @@ CORBA::Boolean operator>> (
else
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
diff --git a/TAO/tao/IOPC.h b/TAO/tao/IOPC.h
index 8e6f5722e08..8eb6319734a 100644
--- a/TAO/tao/IOPC.h
+++ b/TAO/tao/IOPC.h
@@ -72,13 +72,13 @@ TAO_NAMESPACE IOP
_tao_seq_Octet (const _tao_seq_Octet &); // copy ctor
~_tao_seq_Octet (void); // dtor
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
@@ -233,13 +233,13 @@ TAO_NAMESPACE IOP
_tao_seq_Octet (const _tao_seq_Octet &); // copy ctor
~_tao_seq_Octet (void); // dtor
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
@@ -434,13 +434,13 @@ TAO_NAMESPACE IOP
_tao_seq_Octet (const _tao_seq_Octet &); // copy ctor
~_tao_seq_Octet (void); // dtor
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
diff --git a/TAO/tao/MessagingC.cpp b/TAO/tao/MessagingC.cpp
index a80d45c0761..0cbfa58c05d 100644
--- a/TAO/tao/MessagingC.cpp
+++ b/TAO/tao/MessagingC.cpp
@@ -2334,7 +2334,7 @@ CORBA::Boolean operator<< (
{
// encode all elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
ACE_static_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (Messaging::PolicyValue::_tao_seq_Octet *)&_tao_sequence);
@@ -2344,10 +2344,10 @@ CORBA::Boolean operator<< (
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -2367,7 +2367,7 @@ CORBA::Boolean operator<< (
return 1;
// retrieve all the elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
@@ -2380,10 +2380,10 @@ CORBA::Boolean operator<< (
else
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
diff --git a/TAO/tao/MessagingC.h b/TAO/tao/MessagingC.h
index d95e5ac65c7..dfa4d6ef04e 100644
--- a/TAO/tao/MessagingC.h
+++ b/TAO/tao/MessagingC.h
@@ -1903,13 +1903,13 @@ class TAO_Export QueueOrderPolicy: public virtual CORBA::Policy
#endif /* ! __GNUC__ || g++ >= 2.8 */
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
@@ -2333,13 +2333,13 @@ class TAO_Export QueueOrderPolicy: public virtual CORBA::Policy
#endif /* ! __GNUC__ || g++ >= 2.8 */
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index aab72d498d5..c6d1e2ed4d2 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -2058,14 +2058,14 @@ operator<< (TAO_OutputCDR& cdr, const TAO_opaque& x)
{
CORBA::ULong length = x.length ();
cdr.write_ulong (length);
-#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 0)
cdr.write_octet_array (x.get_buffer (), length);
-#else
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
if (x.mb () == 0)
cdr.write_octet_array (x.get_buffer (), length);
else
cdr.write_octet_array_mb (x.mb ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
return (CORBA::Boolean) cdr.good_bit ();
}
@@ -2074,14 +2074,14 @@ operator>>(TAO_InputCDR& cdr, TAO_opaque& x)
{
CORBA::ULong length;
cdr.read_ulong (length);
-#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 0)
x.length (length);
cdr.read_octet_array (x.get_buffer (), length);
-#else
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
x.replace (length, cdr.start ());
x.mb ()->wr_ptr (x.mb ()->rd_ptr () + length);
cdr.skip_bytes (length);
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
return (CORBA::Boolean) cdr.good_bit ();
}
@@ -2252,19 +2252,11 @@ operator>> (istream &is, CORBA::WString_out &wso)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
-#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
-template class TAO_Unbounded_Sequence<CORBA::Octet>;
-#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
-
template class ACE_Dynamic_Service<TAO_Server_Strategy_Factory>;
template class ACE_Dynamic_Service<TAO_Client_Strategy_Factory>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-#if !defined (TAO_NO_COPY_OCTET_SEQUENCES)
-#pragma instantiate TAO_Unbounded_Sequence<CORBA::Octet>
-#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
-
#pragma instantiate ACE_Dynamic_Service<TAO_Server_Strategy_Factory>
#pragma instantiate ACE_Dynamic_Service<TAO_Client_Strategy_Factory>
diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp
index 74e51ad8efb..ca40680e6cc 100644
--- a/TAO/tao/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/SHMIOP_Acceptor.cpp
@@ -262,7 +262,12 @@ TAO_SHMIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
TAO_ObjectKey &object_key)
{
// Create the decoding stream from the encapsulation in the buffer,
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
TAO_InputCDR cdr (profile.profile_data.mb ());
+#else
+ TAO_InputCDR cdr (ACE_reinterpret_cast(char*,profile.profile_data.get_buffer ()),
+ profile.profile_data.length ());
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
CORBA::Octet major, minor;
diff --git a/TAO/tao/SHMIOP_Profile.cpp b/TAO/tao/SHMIOP_Profile.cpp
index 891821f1785..7b7b1771706 100644
--- a/TAO/tao/SHMIOP_Profile.cpp
+++ b/TAO/tao/SHMIOP_Profile.cpp
@@ -458,9 +458,9 @@ TAO_SHMIOP_Profile::create_tagged_profile (void)
// Check whether we have already created the TaggedProfile
if (this->tagged_profile_.profile_data.get_buffer () == 0)
{
- // As we have not created we will now create the TaggedProfile
+ // As we have not created we will now create the TaggedProfile
this->tagged_profile_.tag = TAO_TAG_SHMEM_PROFILE;
-
+
// Create the encapsulation....
TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE,
TAO_ENCAP_BYTE_ORDER,
@@ -469,17 +469,32 @@ TAO_SHMIOP_Profile::create_tagged_profile (void)
this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (),
this->orb_core_->to_iso8859 (),
this->orb_core_->to_unicode ());
-
+
// Create the profile body
this->create_profile_body (encap);
-
+
+ CORBA::ULong length =
+ ACE_static_cast(CORBA::ULong,encap.total_length ());
+
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
// Place the message block in to the Sequence of Octets that we
- // have
- this->tagged_profile_.profile_data.replace (
- (CORBA::ULong) encap.total_length (),
- encap.begin ());
+ // have
+ this->tagged_profile_.profile_data.replace (length,
+ encap.begin ());
+#else
+ this->tagged_profile_.profile_data.length (length);
+ CORBA::Octet *buffer =
+ this->tagged_profile_.profile_data.get_buffer ();
+ for (const ACE_Message_Block *i = encap.begin ();
+ i != encap.end ();
+ i = i->next ())
+ {
+ ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ());
+ buffer += i->length ();
+ }
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1*/
}
-
+
return this->tagged_profile_;
}
diff --git a/TAO/tao/Sequence.cpp b/TAO/tao/Sequence.cpp
index 5038b29c4f1..f648bc39aea 100644
--- a/TAO/tao/Sequence.cpp
+++ b/TAO/tao/Sequence.cpp
@@ -507,21 +507,24 @@ TAO_Unbounded_WString_Sequence::_shrink_buffer (CORBA::ULong nl,
// ****************************************************************
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
TAO_Unbounded_Sequence<CORBA::Octet>::
TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &rhs)
- : TAO_Unbounded_Base_Sequence (rhs),
- mb_ (0)
+ : TAO_Unbounded_Base_Sequence (rhs)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+ , mb_ (0)
+#endif /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
{
if (rhs.buffer_ != 0)
{
CORBA::Octet *tmp1 =
TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (this->maximum_);
+
CORBA::Octet * const tmp2 =
ACE_reinterpret_cast (CORBA::Octet * ACE_CAST_CONST,
rhs.buffer_);
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (rhs.mb_ == 0)
{
ACE_OS::memcpy (tmp1,
@@ -542,6 +545,9 @@ TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<CORBA::Octet> &rhs)
offset += i->length ();
}
}
+#else /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
+ ACE_OS::memcpy (tmp1, tmp2, this->length_);
+#endif /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
this->buffer_ = tmp1;
}
@@ -557,6 +563,7 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator= (const TAO_Unbounded_Sequence<CO
if (this == &rhs)
return *this;
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (this->mb_ != 0)
{
ACE_Message_Block::release (this->mb_);
@@ -564,7 +571,9 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator= (const TAO_Unbounded_Sequence<CO
this->buffer_ =
TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (rhs.length_);
}
- else if (this->release_)
+ else
+#endif /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
+ if (this->release_)
{
if (this->maximum_ < rhs.length_)
{
@@ -585,6 +594,7 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator= (const TAO_Unbounded_Sequence<CO
CORBA::Octet *tmp1 = ACE_reinterpret_cast (CORBA::Octet *, this->buffer_);
CORBA::Octet * const tmp2 = ACE_reinterpret_cast (CORBA::Octet * ACE_CAST_CONST, rhs.buffer_);
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
// for (CORBA::ULong i = 0; i < this->length_; ++i)
// tmp1[i] = tmp2[i];
if (rhs.mb_ == 0)
@@ -600,20 +610,25 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator= (const TAO_Unbounded_Sequence<CO
offset += i->length ();
}
}
+#else /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
+ ACE_OS::memcpy (tmp1, tmp2, this->length_);
+#endif /* (TAO_NO_COPY_OCTET_SEQUENCES == 0) */
return *this;
}
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
TAO_Unbounded_Sequence<CORBA::Octet>::
TAO_Unbounded_Sequence (CORBA::ULong length,
const ACE_Message_Block *mb)
: TAO_Unbounded_Base_Sequence (length,
length,
mb->rd_ptr (),
- 0),
- mb_ (ACE_Message_Block::duplicate (mb))
+ 0)
+ , mb_ (ACE_Message_Block::duplicate (mb))
{
}
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
TAO_Unbounded_Sequence<CORBA::Octet>::~TAO_Unbounded_Sequence (void)
{
@@ -639,12 +654,15 @@ TAO_Unbounded_Sequence<CORBA::Octet>::_allocate_buffer (CORBA::ULong length)
for (CORBA::ULong i = 0; i < this->length_; ++i)
tmp[i] = old[i];
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (this->mb_ != 0)
{
ACE_Message_Block::release (this->mb_);
this->mb_ = 0;
}
- else if (this->release_)
+ else
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+ if (this->release_)
{
TAO_Unbounded_Sequence<CORBA::Octet>::freebuf (old);
}
@@ -655,24 +673,27 @@ TAO_Unbounded_Sequence<CORBA::Octet>::_allocate_buffer (CORBA::ULong length)
void TAO_Unbounded_Sequence<CORBA::Octet>::_deallocate_buffer (void)
{
- if (this->mb_ == 0
- && this->buffer_ != 0
+ if (this->buffer_ != 0
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+ && this->mb_ == 0
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
&& this->release_ != 0)
{
CORBA::Octet *tmp = ACE_reinterpret_cast (CORBA::Octet *, this->buffer_);
TAO_Unbounded_Sequence<CORBA::Octet>::freebuf (tmp);
}
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
else
{
ACE_Message_Block::release (this->mb_);
this->mb_ = 0;
}
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+
this->buffer_ = 0;
}
-#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
-
-////////////////////////////////////////////////////////////////////////////////
+// ****************************************************************
int
operator== (const TAO_Unbounded_Sequence<CORBA::Octet> &lhs,
diff --git a/TAO/tao/Sequence.h b/TAO/tao/Sequence.h
index df9364cd24d..bea630de1f4 100644
--- a/TAO/tao/Sequence.h
+++ b/TAO/tao/Sequence.h
@@ -455,7 +455,6 @@ public:
// ****************************************************************
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
class ACE_Message_Block;
template<class T> class TAO_Unbounded_Sequence;
// forward declaration, we are going to specialize that template
@@ -535,6 +534,8 @@ public:
// = TAO extensions
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+
ACE_Message_Block* mb (void) const;
// Returns the underlying message block, the caller must *not*
// release the copy.
@@ -560,10 +561,9 @@ public:
private:
ACE_Message_Block* mb_;
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
};
-#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
-
// ****************************************************************
// Comparison of octet sequence.
diff --git a/TAO/tao/Sequence.i b/TAO/tao/Sequence.i
index da691a92784..8389c4842fd 100644
--- a/TAO/tao/Sequence.i
+++ b/TAO/tao/Sequence.i
@@ -1,19 +1,6 @@
/* -*- C++ -*- */
// $Id$
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// sequence.i
-//
-// = AUTHOR
-// Carlos O'Ryan and Aniruddha Gokhale
-//
-// ============================================================================
-
// Operations on the unbounded sequence class.
ACE_INLINE
@@ -210,8 +197,6 @@ TAO_Unbounded_WString_Sequence (CORBA::ULong maximum,
// ****************************************************************
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
-
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE CORBA::Octet *
TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (CORBA::ULong size)
@@ -229,7 +214,9 @@ TAO_Unbounded_Sequence<CORBA::Octet>::freebuf (CORBA::Octet *buffer)
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE
TAO_Unbounded_Sequence<CORBA::Octet>::TAO_Unbounded_Sequence (void)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
: mb_ (0)
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
{
}
@@ -237,8 +224,10 @@ ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE
TAO_Unbounded_Sequence<CORBA::Octet>::TAO_Unbounded_Sequence (CORBA::ULong maximum)
: TAO_Unbounded_Base_Sequence (maximum,
- TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (maximum)),
- mb_ (0)
+ TAO_Unbounded_Sequence<CORBA::Octet>::allocbuf (maximum))
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+ , mb_ (0)
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
{
}
@@ -248,8 +237,10 @@ TAO_Unbounded_Sequence<CORBA::Octet>::TAO_Unbounded_Sequence (CORBA::ULong maxim
CORBA::ULong length,
CORBA::Octet *data,
CORBA::Boolean release)
- : TAO_Unbounded_Base_Sequence (maximum, length, data, release),
- mb_ (0)
+ : TAO_Unbounded_Base_Sequence (maximum, length, data, release)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
+ , mb_ (0)
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
{
}
@@ -283,6 +274,7 @@ TAO_Unbounded_Sequence<CORBA::Octet>::get_buffer (CORBA::Boolean orphan)
ACE_reinterpret_cast (CORBA::Octet*,this->buffer_);
}
}
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
else if (this->mb_ != 0) // (orphan == 1)
{
// We must create a copy anyway:
@@ -306,6 +298,21 @@ TAO_Unbounded_Sequence<CORBA::Octet>::get_buffer (CORBA::Boolean orphan)
this->buffer_ = 0;
this->release_ = 0;
}
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
+ else
+ {
+ result = ACE_reinterpret_cast (CORBA::Octet*,this->buffer_);
+ if (this->release_ != 0)
+ {
+ // We set the state back to default and relinquish
+ // ownership.
+ this->maximum_ = 0;
+ this->length_ = 0;
+ this->buffer_ = 0;
+ this->release_ = 0;
+ }
+ }
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
/* else
// Oops, it's not our buffer to relinquish...
return 0;
@@ -331,6 +338,7 @@ TAO_Unbounded_Sequence<CORBA::Octet>::operator[] (CORBA::ULong i) const
return tmp[i];
}
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE ACE_Message_Block*
TAO_Unbounded_Sequence<CORBA::Octet>::mb (void) const
@@ -351,6 +359,8 @@ TAO_Unbounded_Sequence<CORBA::Octet>::replace (CORBA::ULong length,
this->release_ = 0;
}
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+
ACE_TEMPLATE_METHOD_SPECIALIZATION
ACE_INLINE void
TAO_Unbounded_Sequence<CORBA::Octet>::replace (CORBA::ULong max,
@@ -360,12 +370,16 @@ TAO_Unbounded_Sequence<CORBA::Octet>::replace (CORBA::ULong max,
{
this->maximum_ = max;
this->length_ = length;
+
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (this->mb_ != 0)
{
ACE_Message_Block::release (this->mb_);
this->mb_ = 0;
}
- else if (this->buffer_ && this->release_ == 1)
+ else
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+ if (this->buffer_ && this->release_ == 1)
{
CORBA::Octet* tmp = ACE_reinterpret_cast(CORBA::Octet*,this->buffer_);
TAO_Unbounded_Sequence<CORBA::Octet>::freebuf (tmp);
@@ -373,5 +387,3 @@ TAO_Unbounded_Sequence<CORBA::Octet>::replace (CORBA::ULong max,
this->buffer_ = data;
this->release_ = release;
}
-
-#endif /* defined (TAO_NO_COPY_OCTET_SEQUENCES) */
diff --git a/TAO/tao/Services.cpp b/TAO/tao/Services.cpp
index 346784e1b14..71903f763d0 100644
--- a/TAO/tao/Services.cpp
+++ b/TAO/tao/Services.cpp
@@ -399,7 +399,7 @@ CORBA::Boolean operator<< (
{
// encode all elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
ACE_dynamic_cast (TAO_Unbounded_Sequence<CORBA::Octet>*, (CORBA_ServiceDetail::_tao_seq_Octet *)&_tao_sequence);
@@ -409,10 +409,10 @@ CORBA::Boolean operator<< (
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
}
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.write_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
@@ -426,7 +426,7 @@ CORBA::Boolean operator>> (TAO_InputCDR &strm, CORBA_ServiceDetail::_tao_seq_Oct
_tao_sequence.length (_tao_seq_len);
// retrieve all the elements
-#if defined (TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
if (ACE_BIT_DISABLED (strm.start ()->flags (),ACE_Message_Block::DONT_DELETE))
{
TAO_Unbounded_Sequence<CORBA::Octet> *oseq =
@@ -439,10 +439,10 @@ CORBA::Boolean operator>> (TAO_InputCDR &strm, CORBA_ServiceDetail::_tao_seq_Oct
else
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_seq_len);
-#else /* TAO_NO_COPY_OCTET_SEQUENCES */
+#else /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
return strm.read_octet_array (_tao_sequence.get_buffer (), _tao_sequence.length ());
-#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 0 */
}
return 0; // error
}
diff --git a/TAO/tao/Services.h b/TAO/tao/Services.h
index d43e74b080f..3ba6d5241a9 100644
--- a/TAO/tao/Services.h
+++ b/TAO/tao/Services.h
@@ -59,13 +59,13 @@ struct TAO_Export CORBA_ServiceDetail
_tao_seq_Octet (const _tao_seq_Octet &); // copy ctor
~_tao_seq_Octet (void); // dtor
-#if defined(TAO_NO_COPY_OCTET_SEQUENCES)
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
_tao_seq_Octet (
CORBA::ULong length,
const ACE_Message_Block* mb
)
: TAO_Unbounded_Sequence<CORBA::Octet> (length, mb) {}
-#endif /* TAO_NO_COPY_OCTET_SEQUENCE */
+#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */
};
static CORBA::TypeCode_ptr _tc__tao_seq_Octet;
diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp
index eb4277f1dbb..c5145af3816 100644
--- a/TAO/tao/UIOP_Acceptor.cpp
+++ b/TAO/tao/UIOP_Acceptor.cpp
@@ -310,7 +310,12 @@ TAO_UIOP_Acceptor::object_key (IOP::TaggedProfile &profile,
TAO_ObjectKey &object_key)
{
// Create the decoding stream from the encapsulation in the buffer,
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
TAO_InputCDR cdr (profile.profile_data.mb ());
+#else
+ TAO_InputCDR cdr (ACE_reinterpret_cast(char*,profile.profile_data.get_buffer ()),
+ profile.profile_data.length ());
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
CORBA::Octet major, minor;
diff --git a/TAO/tao/UIOP_Profile.cpp b/TAO/tao/UIOP_Profile.cpp
index 67b39e1c226..1094a9ab384 100644
--- a/TAO/tao/UIOP_Profile.cpp
+++ b/TAO/tao/UIOP_Profile.cpp
@@ -369,7 +369,7 @@ TAO_UIOP_Profile::encode (TAO_OutputCDR &stream) const
// Create the profile body
this->create_profile_body (encap);
-
+
// write the encapsulation as an octet sequence...
stream << CORBA::ULong (encap.total_length ());
stream.write_octet_array_mb (encap.begin ());
@@ -383,9 +383,9 @@ TAO_UIOP_Profile::create_tagged_profile (void)
// Check whether we have already created the TaggedProfile
if (this->tagged_profile_.profile_data.get_buffer () == 0)
{
- // As we have not created we will now create the TaggedProfile
+ // As we have not created we will now create the TaggedProfile
this->tagged_profile_.tag = TAO_TAG_UIOP_PROFILE;
-
+
// Create the encapsulation....
TAO_OutputCDR encap (ACE_CDR::DEFAULT_BUFSIZE,
TAO_ENCAP_BYTE_ORDER,
@@ -394,17 +394,29 @@ TAO_UIOP_Profile::create_tagged_profile (void)
this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (),
this->orb_core_->to_iso8859 (),
this->orb_core_->to_unicode ());
-
+
// Create the profile body
this->create_profile_body (encap);
-
+
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
// Place the message block in to the Sequence of Octets that we
- // have
- this->tagged_profile_.profile_data.replace (
- (CORBA::ULong) encap.total_length (),
- encap.begin ());
+ // have
+ this->tagged_profile_.profile_data.replace (length,
+ encap.begin ());
+#else
+ this->tagged_profile_.profile_data.length (length);
+ CORBA::Octet *buffer =
+ this->tagged_profile_.profile_data.get_buffer ();
+ for (const ACE_Message_Block *i = encap.begin ();
+ i != encap.end ();
+ i = i->next ())
+ {
+ ACE_OS::memcpy (buffer, i->rd_ptr (), i->length ());
+ buffer += i->length ();
+ }
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1*/
}
-
+
return this->tagged_profile_;
}
diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h
index 19ae21182ca..c583c253662 100644
--- a/TAO/tao/orbconf.h
+++ b/TAO/tao/orbconf.h
@@ -201,9 +201,9 @@
// in 20+ files, define it conditionally.
// The TAO_OutputCDR class uses the ACE macro, which
// is defined by default.
-//#if defined (ACE_NO_COPY_OCTET_SEQUENCES)
-#define TAO_NO_COPY_OCTET_SEQUENCES
-//#endif /* ACE_NO_COPY_OCTET_SEQUENCES */
+#if !defined(TAO_NO_COPY_OCTET_SEQUENCES)
+# define TAO_NO_COPY_OCTET_SEQUENCES 1
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES */
#if defined (ACE_HAS_EXCEPTIONS)
# define TAO_HAS_EXCEPTIONS
diff --git a/TAO/tests/OctetSeq/OctetSeq.cpp b/TAO/tests/OctetSeq/OctetSeq.cpp
index c7f28ecbc06..d2c4fad03d2 100644
--- a/TAO/tests/OctetSeq/OctetSeq.cpp
+++ b/TAO/tests/OctetSeq/OctetSeq.cpp
@@ -32,9 +32,15 @@ test_write_octet (TAO_OutputCDR &cdr,
char* /* buf */,
size_t bufsize)
{
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
ACE_Message_Block mb (/* buf, */ bufsize);
mb.wr_ptr (bufsize);
Test::OctetSeq os (bufsize, &mb);
+#else
+ Test::OctetSeq os (bufsize);
+ os.length (bufsize);
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
+
if ((cdr << os) == 0)
return -1;
diff --git a/TAO/tests/OctetSeq/client.cpp b/TAO/tests/OctetSeq/client.cpp
index 06ed0ce7746..ed806604edd 100644
--- a/TAO/tests/OctetSeq/client.cpp
+++ b/TAO/tests/OctetSeq/client.cpp
@@ -151,6 +151,9 @@ main (int argc, char *argv[])
server->shutdown (ACE_TRY_ENV);
ACE_TRY_CHECK;
+
+ orb->destroy (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
ACE_CATCHANY
{
diff --git a/TAO/tests/OctetSeq/server.cpp b/TAO/tests/OctetSeq/server.cpp
index da1925bc1c4..c52091468ad 100644
--- a/TAO/tests/OctetSeq/server.cpp
+++ b/TAO/tests/OctetSeq/server.cpp
@@ -59,38 +59,46 @@ main (int argc, char *argv[])
if (parse_args (argc, argv) != 0)
return 1;
- Database_i server_impl (orb.in (),
- 128); // @@ TODO
-
- Test::Database_var server =
- server_impl._this (ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in (), ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ {
+ Database_i server_impl (orb.in (),
+ 128); // @@ TODO
+
+ Test::Database_var server =
+ server_impl._this (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ CORBA::String_var ior =
+ orb->object_to_string (server.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
+
+ // If the ior_output_file exists, output the ior to it
+ if (ior_output_file != 0)
+ {
+ FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ ior_output_file),
+ 1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ if (orb->run () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1);
+ ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
+
+ root_poa->destroy (1, 1, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
- ACE_DEBUG ((LM_DEBUG, "Activated as <%s>\n", ior.in ()));
-
- // If the ior_output_file exists, output the ior to it
- if (ior_output_file != 0)
- {
- FILE *output_file= ACE_OS::fopen (ior_output_file, "w");
- if (output_file == 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "Cannot open output file for writing IOR: %s",
- ior_output_file),
- 1);
- ACE_OS::fprintf (output_file, "%s", ior.in ());
- ACE_OS::fclose (output_file);
- }
-
- poa_manager->activate (ACE_TRY_ENV);
+ orb->destroy (ACE_TRY_ENV);
ACE_TRY_CHECK;
-
- if (orb->run () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "orb->run"), -1);
- ACE_DEBUG ((LM_DEBUG, "event loop finished\n"));
}
ACE_CATCHANY
{
diff --git a/TAO/tests/OctetSeq/test_i.cpp b/TAO/tests/OctetSeq/test_i.cpp
index 04692a022af..fabab6821c3 100644
--- a/TAO/tests/OctetSeq/test_i.cpp
+++ b/TAO/tests/OctetSeq/test_i.cpp
@@ -8,6 +8,11 @@
ACE_RCSID(OctetSeq, test_i, "$Id$")
+Database_i::~Database_i (void)
+{
+ delete[] this->elements_;
+}
+
void
Database_i::set (Test::Index i,
const Test::OctetSeq& seq,
@@ -22,6 +27,7 @@ Database_i::set (Test::Index i,
returned_token = verification_token;
CORBA::ULong len = seq.length ();
+#if (TAO_NO_COPY_OCTET_SEQUENCES == 1)
// CORBA::ULong max = seq.maximum ();
ACE_Message_Block *mb = seq.mb ();
if (mb == 0)
@@ -32,6 +38,9 @@ Database_i::set (Test::Index i,
{
this->elements_[i].replace (len, seq.mb ());
}
+#else
+ this->elements_[i] = seq;
+#endif /* TAO_NO_COPY_OCTET_SEQUENCES == 1 */
}
Test::OctetSeq*
diff --git a/TAO/tests/OctetSeq/test_i.h b/TAO/tests/OctetSeq/test_i.h
index cc65f927d44..6393e049db6 100644
--- a/TAO/tests/OctetSeq/test_i.h
+++ b/TAO/tests/OctetSeq/test_i.h
@@ -28,6 +28,9 @@ public:
Test::Index max_range);
// ctor
+ ~Database_i (void);
+ // dtor
+
// = The Simple_Server methods.
void set (Test::Index i,
const Test::OctetSeq& seq,