summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp')
-rw-r--r--TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
index 583ea652251..5befc431aba 100644
--- a/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_sequence/cdr_op_cs.cpp
@@ -124,6 +124,7 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node)
<< be_nl << be_nl;
*os << "if (strm << _tao_seq_len)" << be_idt_nl
<< "{" << be_idt_nl;
+
// Now encode the sequence elements.
*os << "// Encode all elements." << be_nl;
@@ -232,7 +233,21 @@ be_visitor_sequence_cdr_op_cs::visit_sequence (be_sequence *node)
*os << "// Retrieve all the elements." << be_nl;
- this->visit_node (bt);
+ if (bt->node_type () == AST_Decl::NT_sequence)
+ {
+ this->visit_node (node);
+ }
+ else
+ {
+ if (bt->accept (this) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "be_visitor_sequence_cdr_op_cs::"
+ "visit_sequence - "
+ "Base type codegen failed\n"),
+ -1);
+ }
+ }
if (expr->ev ()->u.ulval > 0)
{