summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs
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
commit5c395ae6948b4a21d66f28698cbee663d1b31da3 (patch)
tree60464946c9b4cbf6df4604355b71f34a6fcdeada /TAO/orbsvcs
parent908ff89f75b1c1530adaeabcefa4a722432e1dfe (diff)
downloadATCD-5c395ae6948b4a21d66f28698cbee663d1b31da3.tar.gz
ChangeLogTag: Mon Feb 7 08:49:46 2005 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/orbsvcs')
-rw-r--r--TAO/orbsvcs/orbsvcs/Log/LogRecordStore.cpp33
-rw-r--r--TAO/orbsvcs/tests/InterfaceRepo/IFR_Test/Admin_Client.cpp4
2 files changed, 20 insertions, 17 deletions
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;