summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-02-07 14:51:43 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2005-02-07 14:51:43 +0000
commitb35a9d21e4d9f732847d217fdf95088e87d5ed9c (patch)
tree60464946c9b4cbf6df4604355b71f34a6fcdeada
parent0250bd0adf905865f61580d99f8f826115a2509b (diff)
downloadATCD-b35a9d21e4d9f732847d217fdf95088e87d5ed9c.tar.gz
ChangeLogTag: Mon Feb 7 08:49:46 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog17
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp33
-rw-r--r--TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp4
-rw-r--r--TAO/tao/Any_Array_Impl_T.cpp2
-rw-r--r--TAO/tao/Any_Basic_Impl_T.cpp2
-rw-r--r--TAO/tao/Any_Special_Impl_T.cpp2
-rw-r--r--TAO/tao/Any_Unknown_IDL_Type.cpp1
-rw-r--r--TAO/tao/DynamicAny/DynArray_i.cpp7
-rw-r--r--TAO/tao/DynamicAny/DynSequence_i.cpp6
-rw-r--r--TAO/tao/DynamicAny/DynStruct_i.cpp6
-rw-r--r--TAO/tao/DynamicAny/DynUnion_i.cpp5
11 files changed, 56 insertions, 29 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 3e873733ea8..7e4d04801f1 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,20 @@
+Mon Feb 7 08:49:46 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * orbsvcs/orbsvcs/Log/LogRecordStore.cpp:
+ * orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp:
+ * tao/Any_Array_Impl_T.cpp:
+ * tao/Any_Basic_Impl_T.cpp:
+ * tao/Any_Special_Impl_T.cpp:
+ * tao/Any_Unknown_IDL_Type.cpp:
+ * tao/DynamicAny/DynArray_i.cpp:
+ * tao/DynamicAny/DynSequence_i.cpp:
+ * tao/DynamicAny/DynStruct_i.cpp:
+ * tao/DynamicAny/DynUnion_i.cpp:
+
+ Fixed various minor problems overlooked in
+
+ Sun Feb 6 19:46:23 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
+
Mon Feb 7 14:45:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/tests/Trading/run_test.pl:
diff --git a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp b/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp
index 18d9a0b1e4d..84623803467 100644
--- a/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp
+++ b/TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp
@@ -3,6 +3,7 @@
#include "orbsvcs/Time_Utilities.h"
#include "orbsvcs/Log/Log_Constraint_Interpreter.h"
#include "orbsvcs/Log/Log_Constraint_Visitors.h"
+#include "tao/Any_Unknown_IDL_Type.h"
#include "ace/OS_NS_sys_time.h"
ACE_RCSID (Log,
@@ -175,23 +176,25 @@ TAO_LogRecordStore::get_storage (void)
}
size_t
-TAO_LogRecordStore::log_record_size(const DsLogAdmin::LogRecord &rec)
+TAO_LogRecordStore::log_record_size (const DsLogAdmin::LogRecord &rec)
{
- CORBA::TypeCode_ptr tc;
- ACE_Message_Block *mb;
- size_t mb_size;
+ size_t mb_size = 0;
+ TAO::Any_Impl *impl = rec.info.impl ();
+
+ if (impl->encoded ())
+ {
+ TAO::Unknown_IDL_Type *unk =
+ dynamic_cast<TAO::Unknown_IDL_Type *> (impl);
+
+ mb_size = unk->_tao_get_cdr ().start ()->length ();
+ }
+ else
+ {
+ // If the Any is not encoded, it just has a stored value
+ // instead of a CDR stream, not sure what info would be
+ // useful here.
+ }
- // Extract the typecode and message block from the record.
- tc = rec.info.type ();
- mb = rec.info._tao_get_cdr (); // TAO extension
-
- if (mb != NULL) {
- // Get the size of the actual data in the ACE_Message_Block.
- mb_size = mb->length ();
- } else {
- mb_size = 0;
- }
-
return sizeof (rec) + mb_size;
}
diff --git a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp
index 0988b016e72..2a97279bcd0 100644
--- a/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp
+++ b/TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp
@@ -1517,11 +1517,11 @@ Admin_Client::union_test (ACE_ENV_SINGLE_ARG_DECL)
u_members[1].type = CORBA::TypeCode::_duplicate (CORBA::_tc_void);
TAO_OutputCDR maker0;
maker0.write_ulong (2); // TWO
+ TAO_InputCDR maker0_in (maker0);
TAO::Unknown_IDL_Type *impl0 = 0;
ACE_NEW (impl0,
TAO::Unknown_IDL_Type (d_type.in (),
- maker0.begin (),
- TAO_ENCAP_BYTE_ORDER));
+ maker0_in));
CORBA::Any any0;
any0.replace (impl0);
u_members[1].label = any0;
diff --git a/TAO/tao/Any_Array_Impl_T.cpp b/TAO/tao/Any_Array_Impl_T.cpp
index b048bd3e3f5..de648b9cd5e 100644
--- a/TAO/tao/Any_Array_Impl_T.cpp
+++ b/TAO/tao/Any_Array_Impl_T.cpp
@@ -4,7 +4,7 @@
#define TAO_ANY_ARRAY_IMPL_T_C
#include "tao/Any_Array_Impl_T.h"
-#include "tao/Any.h"
+#include "tao/Any_Unknown_IDL_Type.h"
#include "tao/Marshal.h"
#include "tao/debug.h"
#include "tao/CDR.h"
diff --git a/TAO/tao/Any_Basic_Impl_T.cpp b/TAO/tao/Any_Basic_Impl_T.cpp
index 82336a5dfe0..79bb6a1896b 100644
--- a/TAO/tao/Any_Basic_Impl_T.cpp
+++ b/TAO/tao/Any_Basic_Impl_T.cpp
@@ -4,7 +4,7 @@
#define TAO_ANY_BASIC_IMPL_T_C
#include "tao/Any_Basic_Impl_T.h"
-#include "tao/Any.h"
+#include "tao/Any_Unknown_IDL_Type.h"
#include "tao/Marshal.h"
#include "tao/Environment.h"
#include "tao/SystemException.h"
diff --git a/TAO/tao/Any_Special_Impl_T.cpp b/TAO/tao/Any_Special_Impl_T.cpp
index 3090904cc30..00d2766e517 100644
--- a/TAO/tao/Any_Special_Impl_T.cpp
+++ b/TAO/tao/Any_Special_Impl_T.cpp
@@ -4,7 +4,7 @@
#define TAO_ANY_SPECIAL_IMPL_T_C
#include "tao/Any_Special_Impl_T.h"
-#include "tao/Any.h"
+#include "tao/Any_Unknown_IDL_Type.h"
#include "tao/Marshal.h"
#include "tao/Environment.h"
#include "tao/Typecode.h"
diff --git a/TAO/tao/Any_Unknown_IDL_Type.cpp b/TAO/tao/Any_Unknown_IDL_Type.cpp
index b6f9432f8f4..1154674fe69 100644
--- a/TAO/tao/Any_Unknown_IDL_Type.cpp
+++ b/TAO/tao/Any_Unknown_IDL_Type.cpp
@@ -24,6 +24,7 @@ TAO::Unknown_IDL_Type::Unknown_IDL_Type (
ACE_TRY_NEW_ENV
{
this->_tao_decode (cdr ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
}
ACE_CATCH (CORBA::Exception, ex)
{
diff --git a/TAO/tao/DynamicAny/DynArray_i.cpp b/TAO/tao/DynamicAny/DynArray_i.cpp
index e1393c8a740..60e29395a60 100644
--- a/TAO/tao/DynamicAny/DynArray_i.cpp
+++ b/TAO/tao/DynamicAny/DynArray_i.cpp
@@ -84,9 +84,10 @@ TAO_DynArray_i::init (const CORBA::Any & any
{
CORBA::Any field_any;
TAO::Unknown_IDL_Type *field_unk = 0;
+ TAO_InputCDR unk_in (cdr);
ACE_NEW (field_unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (cdr)));
+ unk_in));
field_any.replace (field_unk);
// This recursive step will call the correct constructor
@@ -452,10 +453,11 @@ TAO_DynArray_i::from_any (const CORBA::Any& any
for (CORBA::ULong i = 0; i < arg_length; ++i)
{
CORBA::Any field_any;
+ TAO_InputCDR unk_in (cdr);
TAO::Unknown_IDL_Type *field_unk = 0;
ACE_NEW (field_unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (cdr)));
+ unk_in));
field_any.replace (field_unk);
this->da_members_[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -500,7 +502,6 @@ TAO_DynArray_i::to_any (ACE_ENV_SINGLE_ARG_DECL)
TAO_OutputCDR out_cdr;
CORBA::Any_var field_any;
size_t length = this->da_members_.size ();
- bool type_known = false;
for (size_t i = 0; i < length; ++i)
{
diff --git a/TAO/tao/DynamicAny/DynSequence_i.cpp b/TAO/tao/DynamicAny/DynSequence_i.cpp
index dfd9843f310..6af07a1b9a8 100644
--- a/TAO/tao/DynamicAny/DynSequence_i.cpp
+++ b/TAO/tao/DynamicAny/DynSequence_i.cpp
@@ -87,10 +87,11 @@ TAO_DynSequence_i::init (const CORBA::Any& any
for (CORBA::ULong i = 0; i < length; ++i)
{
CORBA::Any field_any;
+ TAO_InputCDR unk_in (cdr);
TAO::Unknown_IDL_Type *field_unk = 0;
ACE_NEW (field_unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (cdr)));
+ unk_in));
field_any.replace (field_unk);
// This recursive step will call the correct constructor
@@ -599,10 +600,11 @@ TAO_DynSequence_i::from_any (const CORBA::Any & any
for (CORBA::ULong i = 0; i < arg_length; ++i)
{
CORBA::Any field_any;
+ TAO_InputCDR unk_in (cdr);
TAO::Unknown_IDL_Type *field_unk = 0;
ACE_NEW (field_unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (cdr)));
+ unk_in));
field_any.replace (field_unk);
if (i < this->component_count_)
diff --git a/TAO/tao/DynamicAny/DynStruct_i.cpp b/TAO/tao/DynamicAny/DynStruct_i.cpp
index 2cd93ecb739..94168912ba8 100644
--- a/TAO/tao/DynamicAny/DynStruct_i.cpp
+++ b/TAO/tao/DynamicAny/DynStruct_i.cpp
@@ -124,9 +124,10 @@ TAO_DynStruct_i::set_from_any (const CORBA::Any & any
ACE_CHECK;
CORBA::Any field_any;
+ TAO_InputCDR unk_in (in);
ACE_NEW (unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (in)));
+ unk_in));
field_any.replace (unk);
// This recursive step will call the correct constructor
@@ -581,10 +582,11 @@ TAO_DynStruct_i::from_any (const CORBA::Any & any
ACE_CHECK;
CORBA::Any field_any;
+ TAO_InputCDR unk_in (in);
TAO::Unknown_IDL_Type *unk = 0;
ACE_NEW (unk,
TAO::Unknown_IDL_Type (field_tc.in (),
- TAO_InputCDR (in)));
+ unk_in));
field_any.replace (unk);
this->da_members_[i]->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
diff --git a/TAO/tao/DynamicAny/DynUnion_i.cpp b/TAO/tao/DynamicAny/DynUnion_i.cpp
index 110b182c6ef..06536297cdf 100644
--- a/TAO/tao/DynamicAny/DynUnion_i.cpp
+++ b/TAO/tao/DynamicAny/DynUnion_i.cpp
@@ -164,9 +164,10 @@ TAO_DynUnion_i::set_from_any (const CORBA::Any & any,
in = tmp_in;
}
+ TAO_InputCDR unk_in (in);
ACE_NEW (unk,
- TAO::Unknown_IDL_Type (disc_tc.in (),
- TAO_InputCDR (in)));
+ TAO::Unknown_IDL_Type (disc_tc.in (),
+ unk_in));
disc_any.replace (unk);