Hi.
Sorry... Damage of the hard disk.
My archive tao-bugs mailinglist and modified source files lost. :(
Please, repeat, in what file and what change it is necessary to do.
I immediately can begin to test.
--
Best regards,
Oleg
Sorry... Damage of the hard disk.
My archive tao-bugs mailinglist and modified source files lost. :(
Please, repeat, in what file and what change it is necessary to do.
I immediately can begin to test.
--
Best regards,
Oleg
> Sorry... Damage of the hard disk.
> My archive tao-bugs mailinglist and modified source files lost. :(
> Please, repeat, in what file and what change it is necessary to do.
> I immediately can begin to test.
-kitty.
--
Krishnakumar B <kitty at cs dot wustl dot edu>
Distributed Object Computing Laboratory, Washington University in St.Louis
> Hi.
>
> Sorry... Damage of the hard disk.
> My archive tao-bugs mailinglist and modified source files lost. :(
>
> Please, repeat, in what file and what change it is necessary to do.
> I immediately can begin to test.
May be these links would help
http://groups.yahoo.com/group/tao-bugs/message/2518
http://groups.yahoo.com/group/tao-bugs/message/2521
Thanks
Bala
It is checked on WinXP Pro, BCB6 (Update 2).
Functions decode and decode_value:
---------------------------------------------
CORBA::Any *
TAO_CDR_Encaps_Codec::decode (const CORBA::OctetSeq & data
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
IOP::Codec::FormatMismatch))
{
// @todo How do we check for a format mismatch so that we can throw
// a IOP::Codec::FormatMismatch exception?
// @todo Is this the best way to extract the Any from the OctetSeq?
// Notice that we need to extract the TypeCode and the value from
// the octet sequence, and place them into the Any. We can't just
// insert the octet sequence into the Any.
ACE_Message_Block mb (data.length () + 2 * ACE_CDR::MAX_ALIGNMENT);
ACE_CDR::mb_align (&mb);
ACE_OS::memcpy (mb.rd_ptr (), data.get_buffer (), data.length ());
size_t rd_pos = mb.rd_ptr () - mb.base ();
size_t wr_pos = mb.wr_ptr () - mb.base () + data.length ();
TAO_InputCDR cdr (mb.data_block (),
ACE_Message_Block::DONT_DELETE,
rd_pos,
wr_pos,
ACE_CDR_BYTE_ORDER,
this->major_,
this->minor_,
this->orb_core_);
CORBA::Boolean byte_order;
if (cdr >> TAO_InputCDR::to_boolean (byte_order))
{
cdr.reset_byte_order (ACE_static_cast (int, byte_order));
CORBA::Any * any = 0;
ACE_NEW_THROW_EX (any,
CORBA::Any,
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM),
CORBA::COMPLETED_NO));
ACE_CHECK_RETURN (0);
CORBA::Any_var safe_any = any;
if (cdr >> (*any))
return safe_any._retn ();
}
ACE_THROW_RETURN (IOP::Codec::FormatMismatch (), 0);
ACE_OS::memcpy (mb.rd_ptr (), data.get_buffer (), data.length ());
// @todo How do we check for a type mismatch so that we can
// throw a IOP::Codec::TypeMismatch exception?
// @@ I added a check below. See the comment. I'm not sure
// if it is a valid check.
// -Ossama
// @todo Most of this code was copied from
// operator>> (TAO_InputCDR &cdr, CORBA::Any &x)
// in Any.cpp. Rather than copy the code, the code should be
// refactored to make it possible to use the given TypeCode
// rather than attempt to extract it from the CDR
// encapsulation.
CORBA::ULong sequence_length = data.length ();
size_t rd_pos = mb.rd_ptr () - mb.base ();
size_t wr_pos = mb.wr_ptr () - mb.base () + data.length ();
TAO_InputCDR cdr (mb.data_block (),
ACE_Message_Block::DONT_DELETE,
rd_pos,
wr_pos,
ACE_CDR_BYTE_ORDER,
this->major_,
this->minor_,
this->orb_core_);
CORBA::Boolean byte_order;
if (cdr >> TAO_InputCDR::to_boolean (byte_order))
{
cdr.reset_byte_order (ACE_static_cast (int, byte_order));
// @@ (JP) The following code depends on the fact that
// TAO_InputCDR does not contain chained message blocks,
// otherwise <begin> and <end> could be part of
// different buffers!
// This will be the start of a new message block.
char *begin = cdr.rd_ptr ();
// Skip over the next argument.
CORBA::TypeCode::traverse_status status =
TAO_Marshal_Object::perform_skip (tc,
&cdr
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0); // @@ Should we throw a
// IOP::Codec::TypeMismatch exception
// here if this fails?
if (status == CORBA::TypeCode::TRAVERSE_CONTINUE)
{
// This will be the end of the new message block.
char *end = cdr.rd_ptr ();
size_t size = end - begin;
// @@ I added the following check, but I'm not sure if it is
// a valid check. Can someone verify this?
// -Ossama
// If the unaligned buffer size is not equal to the octet
// sequence length (minus the "byte order byte") then the
// TypeCode does not correspond to the data in the CDR
// encapsulation. However, even if they do match it is
// still uncertain if the TypeCode corresponds to the data
// in the octet sequence. With this test, it is only
// possible to determine if the TypeCode does *not* match
// the data, not if it does match.
if (size != sequence_length - 1)
ACE_THROW_RETURN (IOP::Codec::TypeMismatch (), 0);
ptr_arith_t offset =
ptr_arith_t (begin) % ACE_CDR::MAX_ALIGNMENT;
mb.rd_ptr (offset);
mb.wr_ptr (offset + size);
CORBA::Any * any = 0;
ACE_NEW_THROW_EX (any,
CORBA::Any,
CORBA::NO_MEMORY (
CORBA_SystemException::_tao_minor_code (
TAO_DEFAULT_MINOR_CODE,
ENOMEM),
CORBA::COMPLETED_NO));
ACE_CHECK_RETURN (0);
CORBA::Any_var safe_any = any;
// Stick it into the Any. It gets duplicated there.
any->_tao_replace (tc,
cdr.byte_order (),
&mb);
return safe_any._retn ();
}
else
ACE_THROW_RETURN (IOP::Codec::TypeMismatch (), 0);
}
ACE_THROW_RETURN (IOP::Codec::FormatMismatch (), 0);
Thanks for verifying this. Could you please pass the test case along
that you tested this with so that it can be part of the test suite?
Thanks
bala
1. Looking for J.YEN, J.LEE, N.PFLUGER and Swami NATARAJAN's e-mail addresses
I am looking for the e-mail adress of :
John YEN, Jonathan LEE, Nathan Pfluger and Swami Natarajan
at the Texas A&M University.
Would someone be kind enough to send theirs internet e-mail addresses?
With best regards.
Laurent RIOUX.
4. Serial Cable Price Correction. -virsacom
5. Looking for J.YEN, J.LEE, N.PFLUGER and Swami NATARAJAN's e-mail addresses
6. Supra 33.6 <-> USR Total Control
7. TAO_CDR_Encaps_Codec::decode_v
8. how to set the configuration in dependences
9. TAO_CDR_Encaps_Codec::encode: Possible optimization?
10. TAO_CDR_Encaps_Codec::encode: Possible optimizatio
11. TAO_CDR_Encaps_Codec::encode: Possible optimizatio n?