diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-18 17:46:44 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-01-18 17:46:44 +0000 |
commit | 4d4c7720ce95f6afe92c43c35cd40fbebbdb5b38 (patch) | |
tree | 75ee502141c7dcaebacdd5ce67e74b768067c02a /TAO/tao/decode.cpp | |
parent | c3f6440907962f584d8e9bf35dafd0d9316c7fd6 (diff) | |
download | ATCD-4d4c7720ce95f6afe92c43c35cd40fbebbdb5b38.tar.gz |
ChangeLogTag:Mon Jan 18 11:20:10 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/decode.cpp')
-rw-r--r-- | TAO/tao/decode.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/TAO/tao/decode.cpp b/TAO/tao/decode.cpp index e65b67d04aa..73dba8e4111 100644 --- a/TAO/tao/decode.cpp +++ b/TAO/tao/decode.cpp @@ -403,8 +403,31 @@ TAO_Marshal_TypeCode::decode (CORBA::TypeCode_ptr, // must always be negative. See the CORBA spec for details. continue_decoding = (offset < 0); } - - TAO_InputCDR indir_stream (*stream, 8, offset); + + // Slava Galperin <galperin@teknowledge.com> clarifies + // this: + // CORBA Spec says: + // + // The encoding of such an indirection is as a + // TypeCode with a TCKind value that has the special + // value 2^32 -1 (0xffffffff, all ones). Such + // typecodes have a single (simple) parameter, which + // is the long offset (in units of octets) from the + // simple parameter. (This means that an offset of + // negative four (-4) is illegal because it will be + // self-indirecting.) + // (CORBA V2.2 CDR Transfer Syntax February 1998 page 13-17) + // + // This apparently assumes offset from the <em> + // beginning </em> of the simple parameter. + // [Right, because otherwise the value -8 would be + // illegal] + // Because at this point stream is positioned after + // the parameter, we need to account for that when + // constructing indir_stream by subtracting 4 (length + // of the offset parameter itself). + + TAO_InputCDR indir_stream (*stream, 8, offset - 4); continue_decoding = indir_stream.good_bit (); |