summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-03-03 20:29:46 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-03-03 20:29:46 +0000
commit12cc822e0f51b8af1ef79a2944b30555daaaf6fb (patch)
tree73603876865ba64da4206765571b8b68fd37e7b4
parentf444bfbd5a5345c7b8b2ae46189e5f15183fd23b (diff)
downloadATCD-12cc822e0f51b8af1ef79a2944b30555daaaf6fb.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Asynch_Invocation.cpp9
-rw-r--r--TAO/tao/CDR_Interpreter.cpp13
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp2
-rw-r--r--TAO/tao/GIOP_Message_Connectors.cpp2
-rw-r--r--TAO/tao/ORB_Core.cpp11
-rw-r--r--TAO/tao/Reply_Dispatcher.cpp4
-rw-r--r--TAO/tao/Reply_Dispatcher.h15
-rw-r--r--TAO/tao/Reply_Dispatcher.i4
-rw-r--r--TAO/tao/Transport_Mux_Strategy.h10
-rw-r--r--TAO/tao/Typecode.cpp38
-rw-r--r--TAO/tao/Typecode.h12
-rw-r--r--TAO/tao/decode.cpp149
-rw-r--r--TAO/tao/deep_free.cpp10
-rw-r--r--TAO/tao/encode.cpp123
-rw-r--r--TAO/tao/params.h5
-rw-r--r--TAO/tao/params.i3
16 files changed, 126 insertions, 284 deletions
diff --git a/TAO/tao/Asynch_Invocation.cpp b/TAO/tao/Asynch_Invocation.cpp
index 0294b1fd740..386b7999349 100644
--- a/TAO/tao/Asynch_Invocation.cpp
+++ b/TAO/tao/Asynch_Invocation.cpp
@@ -61,9 +61,9 @@ TAO_GIOP_Twoway_Asynch_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
- TAO_Target_Specification spec;
+ this->target_spec_.target_specifier (this->profile_->object_key ());
this->transport_->start_request (this->orb_core_,
- spec,
+ this->target_spec_,
this->out_stream_,
ACE_TRY_ENV);
}
@@ -126,10 +126,9 @@ TAO_GIOP_DII_Deferred_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
- TAO_Target_Specification spec;
- spec.target_specifier (this->profile_->object_key ());
+ this->target_spec_.target_specifier (this->profile_->object_key ());
this->transport_->start_request (this->orb_core_,
- spec,
+ this->target_spec_,
this->out_stream_,
ACE_TRY_ENV);
ACE_CHECK;
diff --git a/TAO/tao/CDR_Interpreter.cpp b/TAO/tao/CDR_Interpreter.cpp
index a6772003aa2..9e25adc446b 100644
--- a/TAO/tao/CDR_Interpreter.cpp
+++ b/TAO/tao/CDR_Interpreter.cpp
@@ -1,6 +1,5 @@
// $Id$
-
// @(#)interp.cpp 1.4 95/11/04
// Copyright 1994-1995 by Sun Microsystems Inc.
// All Rights Reserved
@@ -19,7 +18,6 @@
ACE_RCSID(tao, CDR_Interpreter, "$Id$")
-
TAO_CDR_Interpreter::Table_Element
TAO_CDR_Interpreter::table_[CORBA::TC_KIND_COUNT] =
{
@@ -556,7 +554,7 @@ TAO_CDR_Interpreter::calc_struct_and_except_attributes (TAO_InputCDR *stream,
// adding internal padding), then update the current size to
// handle the member's size.
- size = (size_t) align_binary (size, member_alignment);
+ size = (size_t) ACE_align_binary (size, member_alignment);
size += member_size;
// Finally update the overall structure alignment requirement,
@@ -568,7 +566,7 @@ TAO_CDR_Interpreter::calc_struct_and_except_attributes (TAO_InputCDR *stream,
// Round up the structure size to match its overall alignment. This
// adds tail padding, if needed.
- return (size_t) align_binary (size, alignment);
+ return (size_t) ACE_align_binary (size, alignment);
}
// Calculate size and alignment for a structure.
@@ -777,7 +775,7 @@ TAO_CDR_Interpreter::calc_key_union_attributes (TAO_InputCDR *stream,
// Round up the discriminator's size to include padding it needs in
// order to be followed by the value.
discrim_and_base_size_with_pad =
- (size_t) align_binary (discrim_and_base_size, value_alignment);
+ (size_t) ACE_align_binary (discrim_and_base_size, value_alignment);
discrim_size_with_pad = discrim_and_base_size_with_pad -
sizeof (TAO_Base_Union);
@@ -791,8 +789,9 @@ TAO_CDR_Interpreter::calc_key_union_attributes (TAO_InputCDR *stream,
if (value_alignment > overall_alignment)
overall_alignment = value_alignment;
- return (size_t) align_binary (discrim_and_base_size_with_pad + value_size,
- overall_alignment);
+ return (size_t) ACE_align_binary (discrim_and_base_size_with_pad
+ + value_size,
+ overall_alignment);
}
// Calculate size and alignment for a CORBA discriminated union.
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 0d59a051853..ecb03d4354d 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -3,8 +3,6 @@
#include "tao/GIOP_Message_Base.h"
#include "tao/operation_details.h"
-
-
#if !defined (__ACE_INLINE__)
# include "tao/GIOP_Message_Base.i"
#endif /* __ACE_INLINE__ */
diff --git a/TAO/tao/GIOP_Message_Connectors.cpp b/TAO/tao/GIOP_Message_Connectors.cpp
index 04e3855365d..e667146fac2 100644
--- a/TAO/tao/GIOP_Message_Connectors.cpp
+++ b/TAO/tao/GIOP_Message_Connectors.cpp
@@ -63,7 +63,7 @@ TAO_GIOP_Message_Connectors::
CORBA::ULong &reply_status)
{
- // Cast to the GIOP Message state
+ // Cast to the GIOP Message state
TAO_GIOP_Message_State *state = ACE_dynamic_cast (TAO_GIOP_Message_State *,
&mesg_state);
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 82d5c5501f2..e09f874d776 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -230,7 +230,7 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV)
CORBA::UShort port = 0;
// @@ GIOPLite should be an alternative ORB Messaging protocols, fredk
- int giop_lite = 0;
+ // int giop_lite = 0;
CORBA::Boolean use_ior = 1;
int cdr_tradeoff = ACE_DEFAULT_CDR_MEMCPY_TRADEOFF;
@@ -332,8 +332,11 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV)
// @@ This will have to change since gioplite
// will be considered as an alternate ORB
// messaging protocols.
- giop_lite = 1;
-
+ // giop_lite = 1;
+ ACE_DEBUG ((LM_WARNING,
+ ASYS_TEXT ("(%P|%t) This option has been deprecated \n")
+ ASYS_TEXT ("Please use svc.conf file to load the protcol \n")));
+
arg_shifter.consume_arg ();
}
else if (arg_shifter.cur_arg_strncasecmp ("-ORBDebug") == 0)
@@ -1139,8 +1142,6 @@ TAO_ORB_Core::init (int &argc, char *argv[], CORBA::Environment &ACE_TRY_ENV)
if (cdr_tradeoff >= 0)
this->orb_params ()->cdr_memcpy_tradeoff (cdr_tradeoff);
- this->orb_params ()->use_lite_protocol (giop_lite);
-
this->orb_params ()->std_profile_components (std_profile_components);
// Set up the pluggable protocol infrastructure. First get a
diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp
index 616412d6e8c..7893eeaf428 100644
--- a/TAO/tao/Reply_Dispatcher.cpp
+++ b/TAO/tao/Reply_Dispatcher.cpp
@@ -62,7 +62,7 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status,
this->reply_received_ = 1;
this->reply_status_ = reply_status;
- this->version_ = version;
+ //this->version_ = version;
// Steal the buffer, that way we don't do any unnecesary copies of
// this data.
@@ -266,7 +266,7 @@ TAO_DII_Deferred_Reply_Dispatcher::dispatch_reply (
)
{
this->reply_status_ = reply_status;
- this->version_ = version;
+ //this->version_ = version;
this->message_state_ = message_state;
// Steal the buffer, that way we don't do any unnecesary copies of
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h
index 205b494cf59..e1400576ad2 100644
--- a/TAO/tao/Reply_Dispatcher.h
+++ b/TAO/tao/Reply_Dispatcher.h
@@ -23,9 +23,8 @@
#include "tao/Request.h"
-/////Balas Include" They are not right. We need to set AMI properly
#include "tao/GIOP_Utils.h"
-///////////////////////////////////
+// This should not be here. Please see below for reasons
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -125,12 +124,16 @@ private:
CORBA::ULong reply_status_;
// Reply or LocateReply status.
- TAO_GIOP_Version version_;
+ // TAO_GIOP_Version version_;
// The version
TAO_GIOP_Message_State message_state_;
// All the state required to receive the input...
-
+ // @@ Having members of type TAO_GIOP* indicates that we
+ // (Reply_despatcher) are aware of the underlying messaging
+ // protocol. But for the present let us close our eyes till we are
+ // able to iterate on a use case - Bala.
+
int reply_received_;
// Flag that indicates the reply has been received.
@@ -198,7 +201,7 @@ private:
CORBA::ULong reply_status_;
// Reply or LocateReply status.
- TAO_GIOP_Version version_;
+ // TAO_GIOP_Version version_;
// The version
TAO_GIOP_Message_State *message_state_;
@@ -273,7 +276,7 @@ private:
CORBA::ULong reply_status_;
// Reply or LocateReply status.
- TAO_GIOP_Version version_;
+ //TAO_GIOP_Version version_;
// The version
TAO_GIOP_Message_State *message_state_;
diff --git a/TAO/tao/Reply_Dispatcher.i b/TAO/tao/Reply_Dispatcher.i
index 2ff4767f0aa..984577f6a12 100644
--- a/TAO/tao/Reply_Dispatcher.i
+++ b/TAO/tao/Reply_Dispatcher.i
@@ -7,11 +7,13 @@ TAO_Synch_Reply_Dispatcher::reply_status (void) const
return this->reply_status_;
}
+#if 0
ACE_INLINE const TAO_GIOP_Version&
TAO_Synch_Reply_Dispatcher::version (void) const
{
return this->version_;
}
+#endif /*if 0*/
#if (TAO_HAS_CORBA_MESSAGING == 1)
@@ -49,12 +51,14 @@ TAO_DII_Deferred_Reply_Dispatcher::reply_status (void) const
return this->reply_status_;
}
+#if 0
ACE_INLINE const TAO_GIOP_Version&
TAO_DII_Deferred_Reply_Dispatcher::version (void) const
{
return this->version_;
}
+#endif /*If 0 */
ACE_INLINE void
TAO_DII_Deferred_Reply_Dispatcher::transport (TAO_Transport *t)
{
diff --git a/TAO/tao/Transport_Mux_Strategy.h b/TAO/tao/Transport_Mux_Strategy.h
index c3a1c73f10a..f6d1cbd08b7 100644
--- a/TAO/tao/Transport_Mux_Strategy.h
+++ b/TAO/tao/Transport_Mux_Strategy.h
@@ -166,6 +166,11 @@ protected:
TAO_GIOP_Message_State message_state_;
// Message state to read the incoming message.
+
+ // @@ Having members of type TAO_GIOP* indicates that we
+ // (Transport_Mux_Strategy) are aware of the underlying messaging
+ // protocol. But for the present let us close our eyes till we are
+ // able to iterate on a use case - Bala.
};
// *********************************************************************
@@ -247,6 +252,11 @@ protected:
// is created at start of each incoming message. When that message
// is read, the message is processed and for the next message a new
// message state is created.
+
+ // @@ Having members of type TAO_GIOP* indicates that we
+ // (Transport_Mux_Strategy) are aware of the underlying messaging
+ // protocol. But for the present let us close our eyes till we are
+ // able to iterate on a use case - Bala.
};
// *********************************************************************
diff --git a/TAO/tao/Typecode.cpp b/TAO/tao/Typecode.cpp
index 2ae3dcb0cd7..919a5926c2f 100644
--- a/TAO/tao/Typecode.cpp
+++ b/TAO/tao/Typecode.cpp
@@ -1,6 +1,5 @@
// $Id$
-
// Typecodes essentially consist of just the CDR octets that get
// marshaled and unmarshaled, and this code knows how to parse those
// octets and answer questions CORBA's TypeCode APIs require.
@@ -28,18 +27,29 @@
ACE_RCSID(tao, Typecode, "$Id$")
-
CORBA_TypeCode::Bounds::Bounds (void)
: CORBA_UserException (CORBA::TypeCode::_tc_Bounds)
{
}
-void
-CORBA_TypeCode::Bounds::_raise (void)
+void CORBA_TypeCode::Bounds::_raise (void)
{
TAO_RAISE(*this);
}
+void CORBA_TypeCode::Bounds::_tao_encode (TAO_OutputCDR &cdr,
+ CORBA::Environment &ACE_TRY_ENV) const
+{
+ if (cdr << this->_id ())
+ return;
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void CORBA_TypeCode::Bounds::_tao_decode (TAO_InputCDR &,
+ CORBA::Environment &)
+{
+}
+
CORBA_TypeCode::Bounds*
CORBA_TypeCode::Bounds::_narrow (CORBA_Exception *ex)
{
@@ -62,12 +72,24 @@ CORBA_TypeCode::BadKind::BadKind (void)
{
}
-void
-CORBA_TypeCode::BadKind::_raise (void)
+void CORBA_TypeCode::BadKind::_raise (void)
{
TAO_RAISE(*this);
}
+void CORBA_TypeCode::BadKind::_tao_encode (TAO_OutputCDR &cdr,
+ CORBA::Environment &ACE_TRY_ENV) const
+{
+ if (cdr << this->_id ())
+ return;
+ ACE_THROW (CORBA::MARSHAL ());
+}
+
+void CORBA_TypeCode::BadKind::_tao_decode (TAO_InputCDR &,
+ CORBA::Environment &)
+{
+}
+
CORBA_TypeCode::BadKind*
CORBA_TypeCode::BadKind::_narrow (CORBA_Exception *ex)
{
@@ -241,8 +263,8 @@ CORBA_TypeCode::CORBA_TypeCode (CORBA::TCKind kind,
ACE_NEW (this->non_aligned_buffer_,
char [this->length_ + 4 + 4 + ACE_CDR::MAX_ALIGNMENT]);
- char* start = ptr_align_binary (this->non_aligned_buffer_,
- ACE_CDR::MAX_ALIGNMENT);
+ char* start = ACE_ptr_align_binary (this->non_aligned_buffer_,
+ ACE_CDR::MAX_ALIGNMENT);
(void) ACE_OS::memcpy (start, &this->kind_, 4);
(void) ACE_OS::memcpy (start + 4, &this->length_, 4);
diff --git a/TAO/tao/Typecode.h b/TAO/tao/Typecode.h
index 2dd47a85350..15656c95464 100644
--- a/TAO/tao/Typecode.h
+++ b/TAO/tao/Typecode.h
@@ -72,6 +72,12 @@ public:
Bounds (void);
virtual void _raise (void);
+
+ virtual void _tao_encode (TAO_OutputCDR &cdr,
+ CORBA::Environment &) const;
+ virtual void _tao_decode (TAO_InputCDR &cdr,
+ CORBA::Environment &);
+
static Bounds* _narrow (CORBA_Exception *ex);
virtual int _is_a (const char* interface_id) const;
};
@@ -82,6 +88,12 @@ public:
BadKind (void);
virtual void _raise (void);
+
+ virtual void _tao_encode (TAO_OutputCDR &cdr,
+ CORBA::Environment &) const;
+ virtual void _tao_decode (TAO_InputCDR &cdr,
+ CORBA::Environment &);
+
static BadKind* _narrow (CORBA_Exception *ex);
virtual int _is_a (const char* interface_id) const;
};
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp
index 4adf84234b1..54a67bba637 100644
--- a/TAO/tao/decode.cpp
+++ b/TAO/tao/decode.cpp
@@ -1,6 +1,5 @@
// $Id$
-
// ============================================================================
//
// = LIBRARY
@@ -355,11 +354,14 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
{TAO_ENCAP_BYTE_ORDER, 0};
// Bounded string. Save the bounds
_oc_bounded_string [1] = (CORBA::Long) bound;
- *tcp = new CORBA::TypeCode (ACE_static_cast(CORBA::TCKind, kind),
- 8,
- ACE_reinterpret_cast(char*,_oc_bounded_string),
- 0, sizeof
- (CORBA::String_var), 0);
+ ACE_NEW_THROW_EX (*tcp,
+ CORBA::TypeCode (ACE_static_cast(CORBA::TCKind, kind),
+ 8,
+ ACE_reinterpret_cast(char*,_oc_bounded_string),
+ 0, sizeof
+ (CORBA::String_var), 0),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
}
}
}
@@ -455,12 +457,15 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
// reducing the cost of getting typecodes.
if (continue_decoding)
{
- *tcp = new CORBA::TypeCode ((CORBA::TCKind) indir_kind,
+ ACE_NEW_THROW_EX (*tcp,
+ CORBA::TypeCode ((CORBA::TCKind) indir_kind,
indir_len,
indir_stream.rd_ptr(),
0,
0,
- parent);
+ parent),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
}
}
break;
@@ -487,12 +492,16 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr,
u_int len = (u_int) length;
// create a new typecode
- *tcp = new CORBA::TypeCode ((CORBA::TCKind) kind,
+ ACE_NEW_THROW_EX (*tcp,
+ CORBA::TypeCode ((CORBA::TCKind) kind,
len,
stream->rd_ptr (),
0,
0,
- parent);
+ parent),
+ CORBA::NO_MEMORY ());
+ ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
+
// skip length number of bytes in the stream, else we may
// leave the stream in an undefined state
(void) stream->skip_bytes (length);
@@ -604,9 +613,9 @@ TAO_Marshal_Struct::decode (CORBA::TypeCode_ptr tc,
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
align_offset =
- (ptr_arith_t) ptr_align_binary (data, alignment)
+ (ptr_arith_t) ACE_ptr_align_binary (data, alignment)
- (ptr_arith_t) data
- - ((ptr_arith_t) ptr_align_binary (start_addr, alignment)
+ - ((ptr_arith_t) ACE_ptr_align_binary (start_addr, alignment)
- (ptr_arith_t) start_addr);
if (align_offset < 0)
align_offset += alignment;
@@ -1416,119 +1425,15 @@ TAO_Marshal_Alias::decode (CORBA::TypeCode_ptr tc,
//
// NOTE: This is asymmetric with respect to encoding exceptions.
CORBA::TypeCode::traverse_status
-TAO_Marshal_Except::decode (CORBA::TypeCode_ptr tc,
- const void *data,
+TAO_Marshal_Except::decode (CORBA::TypeCode_ptr,
const void *,
- void *context,
+ const void *,
+ void *,
CORBA::Environment &ACE_TRY_ENV)
{
- TAO_InputCDR *stream = (TAO_InputCDR *) context;
- CORBA::TypeCode::traverse_status retval =
- CORBA::TypeCode::TRAVERSE_CONTINUE;
- CORBA::Boolean continue_decoding = 1;
- CORBA::TypeCode_var param;
- CORBA::Long size, alignment;
-
- data = (char *) data + sizeof (CORBA::Exception);
- // @@ (ASG) The reason this is done is because we want to skip the size
- // of the the base class and its private data members (type_ and
- // refcount_). After skipping these data members, we will have the data
- // members of the derived class which must be encoded.
-
- // Number of fields in the struct.
- int member_count = tc->member_count (ACE_TRY_ENV);
- // @@EXC@@ Rethrow CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE)?
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- for (int i = 0; i < member_count
- && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
- && continue_decoding == 1; i++)
- {
- param = tc->member_type (i, ACE_TRY_ENV);
- // @@EXC@@ Rethrow CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE)?
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- size = param->size (ACE_TRY_ENV);
- // @@EXC@@ Rethrow CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE)?
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- alignment = param->alignment (ACE_TRY_ENV);
- // @@EXC@@ Rethrow CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE)?
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- data = ptr_align_binary (data, alignment);
- switch (param->kind_)
- {
- case CORBA::tk_null:
- case CORBA::tk_void:
- break;
- case CORBA::tk_short:
- case CORBA::tk_ushort:
- continue_decoding =
- stream->read_short (*(CORBA::Short *) data);
- break;
- case CORBA::tk_long:
- case CORBA::tk_ulong:
- case CORBA::tk_float:
- case CORBA::tk_enum:
- continue_decoding =
- stream->read_long (*(CORBA::Long *) data);
- break;
- case CORBA::tk_double:
- case CORBA::tk_longlong:
- case CORBA::tk_ulonglong:
- continue_decoding =
- stream->read_longlong (*(CORBA::LongLong *) data);
- break;
- case CORBA::tk_boolean:
- continue_decoding =
- stream->read_boolean (*(CORBA::Boolean *) data);
- break;
- case CORBA::tk_char:
- case CORBA::tk_octet:
- continue_decoding =
- stream->read_char (*(CORBA::Char *) data);
- break;
- case CORBA::tk_longdouble:
- continue_decoding =
- stream->read_longdouble (*(CORBA::LongDouble *) data);
- break;
- case CORBA::tk_wchar:
- continue_decoding =
- stream->read_wchar (*(CORBA::WChar *) data);
- break;
- case CORBA::tk_any:
- case CORBA::tk_TypeCode:
- case CORBA::tk_Principal:
- case CORBA::tk_objref:
- case CORBA::tk_struct:
- case CORBA::tk_union:
- case CORBA::tk_string:
- case CORBA::tk_sequence:
- case CORBA::tk_array:
- case CORBA::tk_alias:
- case CORBA::tk_except:
- case CORBA::tk_wstring:
- retval = stream->decode (param.in (), data, 0, ACE_TRY_ENV);
- // @@EXC@@ Rethrow CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE)?
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
- break;
- default:
- break;
- }
- data = (char *) data + size;
- }
-
- if (retval != CORBA::TypeCode::TRAVERSE_CONTINUE
- || continue_decoding != 1)
- {
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- ASYS_TEXT ("TAO_Marshal_Except::decode detected error\n")));
- ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_MAYBE),
- CORBA::TypeCode::TRAVERSE_STOP);
- }
- return CORBA::TypeCode::TRAVERSE_CONTINUE;
+ ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE,
+ CORBA::COMPLETED_MAYBE),
+ CORBA::TypeCode::TRAVERSE_STOP);
}
// decode wstring
diff --git a/TAO/tao/deep_free.cpp b/TAO/tao/deep_free.cpp
index 816f83f8c3c..6bd09ce97a3 100644
--- a/TAO/tao/deep_free.cpp
+++ b/TAO/tao/deep_free.cpp
@@ -1,7 +1,6 @@
// ============================================================================
//
// $Id$
-
//
// = LIBRARY
// TAO
@@ -42,7 +41,6 @@
ACE_RCSID(tao, deep_free, "$Id$")
-
CORBA::TypeCode::traverse_status
DEEP_FREE (CORBA::TypeCode_ptr param,
const void *source,
@@ -188,8 +186,8 @@ TAO_Marshal_Struct::deep_free (CORBA::TypeCode_ptr tc,
}
// In case this hasn't been done yet.
- source = ptr_align_binary (source,
- tc->alignment (ACE_TRY_ENV));
+ source = ACE_ptr_align_binary (source,
+ tc->alignment (ACE_TRY_ENV));
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
@@ -218,9 +216,9 @@ TAO_Marshal_Struct::deep_free (CORBA::TypeCode_ptr tc,
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
align_offset =
- (ptr_arith_t) ptr_align_binary (source, alignment)
+ (ptr_arith_t) ACE_ptr_align_binary (source, alignment)
- (ptr_arith_t) source
- - ((ptr_arith_t) ptr_align_binary (start_addr, alignment)
+ - ((ptr_arith_t) ACE_ptr_align_binary (start_addr, alignment)
- (ptr_arith_t) start_addr);
if (align_offset < 0)
align_offset += alignment;
diff --git a/TAO/tao/encode.cpp b/TAO/tao/encode.cpp
index 8157b33905f..0d555abec6e 100644
--- a/TAO/tao/encode.cpp
+++ b/TAO/tao/encode.cpp
@@ -317,9 +317,9 @@ TAO_Marshal_Struct::encode (CORBA::TypeCode_ptr tc,
ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
align_offset =
- (ptr_arith_t) ptr_align_binary (data, alignment)
+ (ptr_arith_t) ACE_ptr_align_binary (data, alignment)
- (ptr_arith_t) data
- - ((ptr_arith_t) ptr_align_binary (start_addr, alignment)
+ - ((ptr_arith_t) ACE_ptr_align_binary (start_addr, alignment)
- (ptr_arith_t) start_addr);
if (align_offset < 0)
align_offset += alignment;
@@ -1092,125 +1092,12 @@ TAO_Marshal_Alias::encode (CORBA::TypeCode_ptr tc,
// encode exception
CORBA::TypeCode::traverse_status
-TAO_Marshal_Except::encode (CORBA::TypeCode_ptr tc,
- const void *data,
+TAO_Marshal_Except::encode (CORBA::TypeCode_ptr,
const void *,
- void *context,
+ const void *,
+ void *,
CORBA::Environment &ACE_TRY_ENV)
{
- CORBA::TypeCode::traverse_status retval = CORBA::TypeCode::TRAVERSE_CONTINUE;
- CORBA::Boolean continue_encoding = 1;
- TAO_OutputCDR *stream = (TAO_OutputCDR *) context;
-
- CORBA::TypeCode_var param;
- CORBA::Long size, alignment;
-
- // first encode the RepositoryID which we can grab from the
- // typecode pointer
- continue_encoding = stream->write_string (tc->id (ACE_TRY_ENV));
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
-#if defined (__BORLANDC__)
- // Borland C++ Builder 4.0 doesn't seem to align caught exceptions
- // along the correct boundaries! Therefore we will assume that the
- // data pointer passed in is already aligned correctly and we will
- // calculate member alignments relative to this pointer.
- char *base_ptr = (char *) data;
-#endif /* __BORLANDC__ */
-
- data = (char *) data + sizeof (CORBA::Exception);
- // @@ (ASG) The reason this is done is because we want to skip the size
- // of the the base class and its private data members (type_ and
- // refcount_). After skipping these data members, we will have the data
- // members of the derived class which must be encoded.
-
- int member_count = tc->member_count (ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- for (int i = 0;
- i < member_count && retval == CORBA::TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == 1;
- i++)
- {
- param = tc->member_type (i, ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- size = param->size (ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
- alignment = param->alignment (ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
-
-#if defined (__BORLANDC__)
- ptrdiff_t offset = (char *) data - base_ptr;
- offset = (ptrdiff_t) ptr_align_binary (offset, alignment);
- data = base_ptr + offset;
-#else
- data = ptr_align_binary (data, alignment);
-#endif /* __BORLANDC__ */
-
- switch (param->kind_)
- {
- case CORBA::tk_null:
- case CORBA::tk_void:
- break;
- case CORBA::tk_short:
- case CORBA::tk_ushort:
- continue_encoding = stream->write_short (*(CORBA::Short *) data);
- break;
- case CORBA::tk_long:
- case CORBA::tk_ulong:
- case CORBA::tk_float:
- case CORBA::tk_enum:
- continue_encoding = stream->write_long (*(CORBA::Long *) data);
- break;
- case CORBA::tk_double:
- case CORBA::tk_longlong:
- case CORBA::tk_ulonglong:
- continue_encoding = stream->write_longlong (*(CORBA::LongLong *) data);
- break;
- case CORBA::tk_boolean:
- continue_encoding = stream->write_boolean (*(CORBA::Boolean *) data);
- break;
- case CORBA::tk_char:
- case CORBA::tk_octet:
- continue_encoding = stream->write_char (*(CORBA::Char *) data);
- break;
- case CORBA::tk_longdouble:
- continue_encoding = stream->write_longdouble (*(CORBA::LongDouble *) data);
- break;
- case CORBA::tk_wchar:
- continue_encoding = stream->write_wchar (*(CORBA::WChar *) data);
- break;
- case CORBA::tk_any:
- case CORBA::tk_TypeCode:
- case CORBA::tk_Principal:
- case CORBA::tk_objref:
- case CORBA::tk_struct:
- case CORBA::tk_union:
- case CORBA::tk_string:
- case CORBA::tk_sequence:
- case CORBA::tk_array:
- case CORBA::tk_alias:
- case CORBA::tk_except:
- case CORBA::tk_wstring:
- retval = stream->encode (param.in (), data, 0, ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA::TypeCode::TRAVERSE_STOP);
- break;
- default:
- break;
- }
- data = (char *) data + size;
- }
-
- if (retval == CORBA::TypeCode::TRAVERSE_CONTINUE
- && continue_encoding == 1)
- return CORBA::TypeCode::TRAVERSE_CONTINUE;
-
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "TAO_Marshal_Except::encode detected error\n"));
-
ACE_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE,
CORBA::COMPLETED_MAYBE),
CORBA::TypeCode::TRAVERSE_STOP);
diff --git a/TAO/tao/params.h b/TAO/tao/params.h
index 0805c8a1272..71640090646 100644
--- a/TAO/tao/params.h
+++ b/TAO/tao/params.h
@@ -109,8 +109,9 @@ public:
// octet sequence is small enough and there is room in the current
// message block it is more efficient just to copy the buffer.
- int use_lite_protocol (void) const;
- void use_lite_protocol (int);
+ // @@Deprecated. Will not be used. - Bala
+ // int use_lite_protocol (void) const;
+ // void use_lite_protocol (int);
// The ORB will use a modified version of GIOP that minimizes the
// header size. By default we use the standard GIOP protocol.
diff --git a/TAO/tao/params.i b/TAO/tao/params.i
index 3b01e2327a0..262abf8eef0 100644
--- a/TAO/tao/params.i
+++ b/TAO/tao/params.i
@@ -78,6 +78,8 @@ TAO_ORB_Parameters::cdr_memcpy_tradeoff (int x)
this->cdr_memcpy_tradeoff_ = x;
}
+#if 0
+// Supprt has been deprecated.
ACE_INLINE int
TAO_ORB_Parameters::use_lite_protocol (void) const
{
@@ -89,6 +91,7 @@ TAO_ORB_Parameters::use_lite_protocol (int x)
{
this->use_lite_protocol_ = x;
}
+#endif /*if 0*/
ACE_INLINE int
TAO_ORB_Parameters::use_dotted_decimal_addresses (void) const