diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-06-15 18:56:10 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-06-15 18:56:10 +0000 |
commit | 535b0cc71b467d95736eea8e9e778e4bbc4c219b (patch) | |
tree | e277eb69bd06fc41160331de91494d950eb3a978 /TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp | |
parent | 16ca54df56baba2206df610d38e5a3143b8c1ce9 (diff) | |
download | ATCD-535b0cc71b467d95736eea8e9e778e4bbc4c219b.tar.gz |
ChangeLogTag: Thu Jun 15 15:05:43 UTC 2006 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp')
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index bdb5192bb28..909176025cf 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -222,14 +222,21 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) be_argument the_argument (AST_Argument::dir_IN, node->field_type (), node->name ()); + + int status = 0; - be_visitor_context ctx (*this->ctx_); - be_visitor_args_vardecl_ss visitor (&ctx); + { + be_visitor_context ctx (*this->ctx_); + be_visitor_args_vardecl_ss vardecl_visitor (&ctx); - if (visitor.visit_argument (&the_argument) == -1) - { - return -1; - } + status = vardecl_visitor.visit_argument (&the_argument); + + if (-1 == status) + { + the_argument.destroy (); + return -1; + } + } *os << be_nl << "TAO_InputCDR & _tao_in =" @@ -241,10 +248,13 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) be_visitor_context ctx (*this->ctx_); ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS); ctx.sub_state (TAO_CodeGen::TAO_CDR_INPUT); - be_visitor_args_marshal_ss visitor (&ctx); + be_visitor_args_marshal_ss marshal_visitor (&ctx); - if (visitor.visit_argument (&the_argument) == -1) + status = marshal_visitor.visit_argument (&the_argument); + + if (-1 == status) { + the_argument.destroy (); return -1; } } @@ -253,9 +263,10 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) << "{" << be_idt_nl; // If marshaling fails, raise exception. - if (this->gen_raise_exception (0, - "::CORBA::MARSHAL", - "") == -1) + status = this->gen_raise_exception (0, + "::CORBA::MARSHAL", + ""); + if (-1 == status) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) gen_raise_exception failed\n"), @@ -265,7 +276,7 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) *os << be_uidt_nl << "}" << be_uidt_nl; - if (this->generate_shared_section (node, os) == -1) + if (-1 == this->generate_shared_section (node, os)) { return -1; } @@ -273,9 +284,11 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) *os << ","; { - be_visitor_args_upcall_ss visitor (this->ctx_); - - if (visitor.visit_argument (&the_argument) == -1) + be_visitor_args_upcall_ss upcall_visitor (this->ctx_); + status = upcall_visitor.visit_argument (&the_argument); + the_argument.destroy (); + + if (-1 == status) { return -1; } @@ -283,7 +296,7 @@ be_visitor_amh_operation_ss::visit_attribute (be_attribute *node) *os << env_arg; - if (this->generate_shared_epilogue (os) == -1) + if (-1 == this->generate_shared_epilogue (os)) { return -1; } |