diff options
-rw-r--r-- | TAO/ChangeLog-99c | 34 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_factory.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ss.cpp (renamed from TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp) | 82 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp | 15 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_operation.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_operation_ss.h (renamed from TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h) | 32 | ||||
-rw-r--r-- | TAO/tao/Reply_Dispatcher.cpp | 7 | ||||
-rwxr-xr-x | TAO/tests/AMI/run_test.pl | 6 | ||||
-rw-r--r-- | TAO/tests/AMI/simple_client.cpp | 10 |
11 files changed, 136 insertions, 74 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 6673966f86c..a4e04eeda60 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,4 +1,36 @@ -Thu Sep 3 01:30:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de> +Thu Sep 03 05:00:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de> + + * tao/Reply_Dispatcher.cpp: + Changed the method TAO_Synch_Reply_Dispatcher::dispatch_reply + to not release the old service context buffer. + This needs to be verified by Carlos to see if it is the right + thing to do. Releasing it caused an access violation. + This passage of the source code needs to be documented. + + * tests/AMI/run_test.pl, + tests/AMI/simple_client.cpp: + Enhanced the example to fully support attributes. + + * TAO_IDL/be/be_visitor_factory.cpp, + TAO_IDL/be/be_visitor_operation.cpp, + TAO_IDL/be_include/be_visitor_operation.h, + TAO_IDL/be_include/be_visitor_operation\ami_handler_operation_ss.h + TAO_IDL/be_include/be_visitor_operation\ami_handler_operation_ss.cpp: + Cleaned up the naming conventions to make AMI code + generation more readable. The ami_handler_operation_ss files + were introduced to support this. + + * TAO_IDL/be_include/be_visitor_operation\ami_handler_servant_operation_ss.h + TAO_IDL/be_include/be_visitor_operation\ami_handler_servant_operation_ss.cpp: + These files got replaced by ones with different names. See comment above. + + * TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp + TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp: + Fixed a the generation of the names for attributes. + AMI works now fine with attributes! + + +Thu Sep 03 01:30:00 1999 Michael Kircher <Michael.Kircher@mchp.siemens.de> * tests/NestedUpcall/Triangle_Test/Object_A_i.cpp tests/NestedUpcall/Triangle_Test/Object_A_i.h diff --git a/TAO/TAO_IDL/be/be_visitor_factory.cpp b/TAO/TAO_IDL/be/be_visitor_factory.cpp index c18444ec95e..056d55ee570 100644 --- a/TAO/TAO_IDL/be/be_visitor_factory.cpp +++ b/TAO/TAO_IDL/be/be_visitor_factory.cpp @@ -903,7 +903,7 @@ TAO_Compiled_Visitor_Factory::make_visitor (be_visitor_context *ctx) return new be_compiled_visitor_operation_ami_handler_operation_cs (new_ctx); case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_SS: - return new be_compiled_visitor_operation_ami_handler_servant_operation_ss (new_ctx); + return new be_compiled_visitor_operation_ami_handler_operation_ss (new_ctx); case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARGLIST_CH: case TAO_CodeGen::TAO_AMI_HANDLER_OPERATION_ARGLIST_CS: diff --git a/TAO/TAO_IDL/be/be_visitor_operation.cpp b/TAO/TAO_IDL/be/be_visitor_operation.cpp index 3517105eb11..d925d74b35e 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation.cpp @@ -59,11 +59,11 @@ #include "be_visitor_operation/ami_ch.cpp" #include "be_visitor_operation/ami_cs.cpp" #include "be_visitor_operation/ami_arglist.cpp" -#include "be_visitor_operation/ami_handler_operation_ch.cpp" #include "be_visitor_operation/ami_handler_arglist.cpp" +#include "be_visitor_operation/ami_handler_operation_ch.cpp" #include "be_visitor_operation/ami_handler_operation_cs.cpp" +#include "be_visitor_operation/ami_handler_operation_ss.cpp" #include "be_visitor_operation/ami_handler_skeleton_cs.cpp" -#include "be_visitor_operation/ami_handler_servant_operation_ss.cpp" #include "be_visitor_operation/ami_handler_argument_marshal.cpp" #include "be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp" #include "be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp" diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ss.cpp index 0fc27df0c42..445ea4a6321 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_servant_operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_operation_ss.cpp @@ -8,7 +8,7 @@ // TAO IDL // // = FILENAME -// ami_handler_servant_operation_ss.cpp +// ami_handler_operation_ss.cpp // // = DESCRIPTION // Visitor generating code for Operation in the server skeleton @@ -25,25 +25,25 @@ #include "be_visitor_operation.h" #include "be_visitor_argument.h" -ACE_RCSID(be_visitor_operation, ami_handler_servant_operation_ss, "$Id$") +ACE_RCSID(be_visitor_operation, ami_handler_operation_ss, "$Id$") // ************************************************************ // Operation visitor for server skeletons // ************************************************************ -be_visitor_operation_ami_handler_servant_operation_ss::be_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx) +be_visitor_operation_ami_handler_operation_ss::be_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx) : be_visitor_operation (ctx) { } -be_visitor_operation_ami_handler_servant_operation_ss::~be_visitor_operation_ami_handler_servant_operation_ss (void) +be_visitor_operation_ami_handler_operation_ss::~be_visitor_operation_ami_handler_operation_ss (void) { } // processing to be done after every element in the scope is processed int -be_visitor_operation_ami_handler_servant_operation_ss::post_process (be_decl *bd) +be_visitor_operation_ami_handler_operation_ss::post_process (be_decl *bd) { // all we do here is to insert a comma and a newline TAO_OutStream *os = this->ctx_->stream (); @@ -53,7 +53,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::post_process (be_decl *bd } int -be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_operation *node) +be_visitor_operation_ami_handler_operation_ss::visit_operation (be_operation *node) { TAO_OutStream *os; // output stream be_type *bt; // type node for return type @@ -72,7 +72,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera if (!bt) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "Bad return type\n"), -1); @@ -89,7 +89,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera if (!intf) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "bad interface scope\n"), -1); @@ -166,7 +166,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera if (this->gen_pre_skel_info (node, bt) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "gen_pre_skel_info failed\n"), -1); @@ -185,7 +185,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for return var decl failed\n"), -1); @@ -201,7 +201,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for return var decl failed\n"), -1); @@ -213,7 +213,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera if (this->gen_demarshal_params (node, bt) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "gen_demarshal_params failed\n"), -1); @@ -251,7 +251,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for making upcall failed\n"), -1); @@ -273,7 +273,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_operation (be_opera } int -be_visitor_operation_ami_handler_servant_operation_ss::visit_argument (be_argument *node) +be_visitor_operation_ami_handler_operation_ss::visit_argument (be_argument *node) { // this method is used to generate the ParamData table entry @@ -285,7 +285,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_argument (be_argume if (!bt) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_argument - " "Bad argument type\n"), -1); @@ -311,7 +311,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::visit_argument (be_argume } int -be_visitor_operation_ami_handler_servant_operation_ss::gen_raise_exception (be_type *, +be_visitor_operation_ami_handler_operation_ss::gen_raise_exception (be_type *, const char *excep, const char *completion_status, const char * /* env */) @@ -326,7 +326,7 @@ be_visitor_operation_ami_handler_servant_operation_ss::gen_raise_exception (be_t } int -be_visitor_operation_ami_handler_servant_operation_ss::gen_check_exception (be_type *, const char * /* env */) +be_visitor_operation_ami_handler_operation_ss::gen_check_exception (be_type *, const char * /* env */) { TAO_OutStream *os = this->ctx_->stream (); @@ -343,19 +343,19 @@ be_visitor_operation_ami_handler_servant_operation_ss::gen_check_exception (be_t // Operation visitor for server skeletons using interpretive marshaling // ********************************************************************* -be_interpretive_visitor_operation_ami_handler_servant_operation_ss:: -be_interpretive_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx) - : be_visitor_operation_ami_handler_servant_operation_ss (ctx) +be_interpretive_visitor_operation_ami_handler_operation_ss:: +be_interpretive_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx) + : be_visitor_operation_ami_handler_operation_ss (ctx) { } -be_interpretive_visitor_operation_ami_handler_servant_operation_ss:: -~be_interpretive_visitor_operation_ami_handler_servant_operation_ss (void) +be_interpretive_visitor_operation_ami_handler_operation_ss:: +~be_interpretive_visitor_operation_ami_handler_operation_ss (void) { } int -be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel_info (be_operation *node, +be_interpretive_visitor_operation_ami_handler_operation_ss::gen_pre_skel_info (be_operation *node, be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); @@ -392,7 +392,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "visit scope failed\n"), -1); @@ -457,7 +457,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel } int -be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_params (be_operation *node, +be_interpretive_visitor_operation_ami_handler_operation_ss::gen_demarshal_params (be_operation *node, be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); @@ -488,7 +488,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_demarsha { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for return var in demarshal failed\n"), -1); @@ -505,7 +505,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_demarsha { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for argument in demarshal failed\n"), -1); @@ -521,7 +521,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_demarsha } int -be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_params (be_operation *node, +be_interpretive_visitor_operation_ami_handler_operation_ss::gen_marshal_params (be_operation *node, be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); @@ -554,7 +554,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_ { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for return var in marshal failed\n"), -1); @@ -573,7 +573,7 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_ { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_visitor_operation_ami_handler_operation_ss::" "visit_operation - " "codegen for argument in marshal failed\n"), -1); @@ -589,19 +589,19 @@ be_interpretive_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_ // Operation visitor for server skeletons using compiled marshaling // ********************************************************************* -be_compiled_visitor_operation_ami_handler_servant_operation_ss:: -be_compiled_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx) - : be_visitor_operation_ami_handler_servant_operation_ss (ctx) +be_compiled_visitor_operation_ami_handler_operation_ss:: +be_compiled_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx) + : be_visitor_operation_ami_handler_operation_ss (ctx) { } -be_compiled_visitor_operation_ami_handler_servant_operation_ss:: -~be_compiled_visitor_operation_ami_handler_servant_operation_ss (void) +be_compiled_visitor_operation_ami_handler_operation_ss:: +~be_compiled_visitor_operation_ami_handler_operation_ss (void) { } int -be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel_info (be_operation *node, +be_compiled_visitor_operation_ami_handler_operation_ss::gen_pre_skel_info (be_operation *node, be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); @@ -621,7 +621,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_pre_skel_inf } int -be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_params (be_operation *node, +be_compiled_visitor_operation_ami_handler_operation_ss::gen_demarshal_params (be_operation *node, be_type *bt) { TAO_OutStream *os = this->ctx_->stream (); @@ -650,7 +650,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_pa { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_compiled_visitor_operation_ami_handler_operation_ss::" "gen_demarshal_params - " "codegen for demarshal failed\n"), -1); @@ -672,7 +672,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_pa { delete visitor; ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_compiled_visitor_operation_ami_handler_operation_ss::" "gen_demarshal_params - " "codegen for demarshal failed\n"), -1); @@ -685,7 +685,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_pa "ACE_TRY_ENV") == -1) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_compiled_visitor_operation_ami_handler_servant_operation_ss::" + "(%N:%l) be_compiled_visitor_operation_ami_handler_operation_ss::" "gen_marshal_and invoke - " "codegen for return var failed\n"), -1); @@ -698,7 +698,7 @@ be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_demarshal_pa } int -be_compiled_visitor_operation_ami_handler_servant_operation_ss::gen_marshal_params (be_operation *, +be_compiled_visitor_operation_ami_handler_operation_ss::gen_marshal_params (be_operation *, be_type *) { // because we do not want to return something. diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp index a589a309535..1109840094c 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_sh.cpp @@ -70,7 +70,19 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_sh::visit_operation (be } // STEP 2: generate the operation name - *os << "void " << node->local_name (); + *os << "void "; + + // check if we are an attribute node in disguise + if (this->ctx_->attribute ()) + { + // now check if we are a "get" or "set" operation + if (node->nmembers () == 1) // set + *os << "set_"; + else + *os << "get_"; + } + + *os << node->local_name (); // STEP 3: generate the argument list with the appropriate mapping. For these // we grab a visitor that generates the parameter listing diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp index 0a31caf870f..1dc9391ceb1 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_handler_thru_poa_collocated_ss.cpp @@ -78,8 +78,19 @@ int be_visitor_operation_ami_handler_thru_poa_collocated_ss::visit_operation (be - *os << "void " << intf->full_coll_name (be_interface::THRU_POA) << "::" - << node->local_name () << " "; + *os << "void " << intf->full_coll_name (be_interface::THRU_POA) << "::"; + + // check if we are an attribute node in disguise + if (this->ctx_->attribute ()) + { + // now check if we are a "get" or "set" operation + if (node->nmembers () == 1) // set + *os << "set_"; + else + *os << "get_"; + } + + *os << node->local_name () << " "; // Generate the argument list with the appropriate mapping (same as // in the header file) diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h index 71288cf61da..649dcab3d6d 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h @@ -58,10 +58,10 @@ #include "be_visitor_operation/ami_ch.h" #include "be_visitor_operation/ami_cs.h" #include "be_visitor_operation/ami_arglist.h" -#include "be_visitor_operation/ami_handler_operation_ch.h" #include "be_visitor_operation/ami_handler_arglist.h" +#include "be_visitor_operation/ami_handler_operation_ch.h" #include "be_visitor_operation/ami_handler_operation_cs.h" -#include "be_visitor_operation/ami_handler_servant_operation_ss.h" +#include "be_visitor_operation/ami_handler_operation_ss.h" #include "be_visitor_operation/ami_handler_skeleton_cs.h" #include "be_visitor_operation/ami_handler_argument_marshal.h" #include "be_visitor_operation/ami_handler_thru_poa_collocated_sh.h" diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_operation_ss.h index a628678959f..2758e86fce3 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_servant_operation_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_operation_ss.h @@ -8,7 +8,7 @@ // TAO IDL // // = FILENAME -// ami_handler_servant_operation_ss.h +// ami_handler_operation_ss.h // // = DESCRIPTION // Visitor for generating code for IDL operations in server skeletons @@ -18,18 +18,18 @@ // // ============================================================================ -#ifndef _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_ -#define _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_ +#ifndef _BE_VISITOR_OPERATION_ami_handler_operation_ss_H_ +#define _BE_VISITOR_OPERATION_ami_handler_operation_ss_H_ // ************************************************************ // Operation visitor for server skeletons // ************************************************************ -class be_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation +class be_visitor_operation_ami_handler_operation_ss : public be_visitor_operation { // // = TITLE - // be_visitor_operation_ami_handler_servant_operation_ss + // be_visitor_operation_ami_handler_operation_ss // // = DESCRIPTION // This is a concrete visitor to generate the server skeletons for operation @@ -37,10 +37,10 @@ class be_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_ // public: - be_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx); + be_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx); // constructor - ~be_visitor_operation_ami_handler_servant_operation_ss (void); + ~be_visitor_operation_ami_handler_operation_ss (void); // destructor virtual int visit_operation (be_operation *node); @@ -77,11 +77,11 @@ public: // concrete visitors -class be_interpretive_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation_ami_handler_servant_operation_ss +class be_interpretive_visitor_operation_ami_handler_operation_ss : public be_visitor_operation_ami_handler_operation_ss { // // = TITLE - // be_interpretive_visitor_operation_ami_handler_servant_operation_ss + // be_interpretive_visitor_operation_ami_handler_operation_ss // // = DESCRIPTION // This is a concrete visitor to generate the server skeletons for @@ -89,10 +89,10 @@ class be_interpretive_visitor_operation_ami_handler_servant_operation_ss : publi // // public: - be_interpretive_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx); + be_interpretive_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx); // constructor - ~be_interpretive_visitor_operation_ami_handler_servant_operation_ss (void); + ~be_interpretive_visitor_operation_ami_handler_operation_ss (void); // destructor // template methods @@ -108,11 +108,11 @@ public: }; -class be_compiled_visitor_operation_ami_handler_servant_operation_ss : public be_visitor_operation_ami_handler_servant_operation_ss +class be_compiled_visitor_operation_ami_handler_operation_ss : public be_visitor_operation_ami_handler_operation_ss { // // = TITLE - // be_compiled_visitor_operation_ami_handler_servant_operation_ss + // be_compiled_visitor_operation_ami_handler_operation_ss // // = DESCRIPTION // This is a concrete visitor to generate the server skeletons for @@ -120,10 +120,10 @@ class be_compiled_visitor_operation_ami_handler_servant_operation_ss : public be // // public: - be_compiled_visitor_operation_ami_handler_servant_operation_ss (be_visitor_context *ctx); + be_compiled_visitor_operation_ami_handler_operation_ss (be_visitor_context *ctx); // constructor - ~be_compiled_visitor_operation_ami_handler_servant_operation_ss (void); + ~be_compiled_visitor_operation_ami_handler_operation_ss (void); // destructor // template methods @@ -139,4 +139,4 @@ public: }; -#endif /* _BE_VISITOR_OPERATION_AMI_HANDLER_SERVANT_OPERATION_SS_H_ */ +#endif /* _BE_VISITOR_OPERATION_ami_handler_operation_ss_H_ */ diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp index 1285f34eef9..7e347c6fc17 100644 --- a/TAO/tao/Reply_Dispatcher.cpp +++ b/TAO/tao/Reply_Dispatcher.cpp @@ -161,6 +161,7 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status, IOP::ServiceContextList &reply_ctx, TAO_GIOP_Message_State *message_state) { + // @@ Michael: Carlos, can we remove these? // this->reply_received_ = 1; this->reply_status_ = reply_status; @@ -172,7 +173,11 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status, CORBA::ULong max = reply_ctx.maximum (); CORBA::ULong len = reply_ctx.length (); IOP::ServiceContext* context_list = reply_ctx.get_buffer (1); - this->reply_service_info_.replace (max, len, context_list, 1); + // @@ Michael: Carlos, why would we release the old buffer? + // By releasing it I got a "acces violation". Could + // you tell me the "right thing"TM ? + // this->reply_service_info_.replace (max, len, context_list, 1); + this->reply_service_info_.replace (max, len, context_list, 0); if (TAO_debug_level >= 4) { diff --git a/TAO/tests/AMI/run_test.pl b/TAO/tests/AMI/run_test.pl index f8d9ce7dcb5..e1882f5c1fd 100755 --- a/TAO/tests/AMI/run_test.pl +++ b/TAO/tests/AMI/run_test.pl @@ -26,8 +26,8 @@ foreach $i (@ARGV) { $iorfile = "server.ior"; $SV = Process::Create ($EXEPREFIX."server$EXE_EXT ", - " -ORBsvcconf server.conf -ORBdebuglevel $debug_level" - . " -o $iorfile"); + " -ORBdebuglevel $debug_level" + . "-d -o $iorfile"); if (ACE::waitforfile_timed ($iorfile, 5) == -1) { print STDERR "ERROR: cannot find file <$iorfile>\n"; @@ -39,7 +39,7 @@ $CL = Process::Create ($EXEPREFIX."$client_process$EXE_EXT ", " -ORBsvcconf $client_conf " . "-ORBdebuglevel $debug_level" . " -k file://$iorfile " - . " -i $iterations"); + . " -i $iterations -d"); $client = $CL->TimedWait (60); if ($client == -1) { diff --git a/TAO/tests/AMI/simple_client.cpp b/TAO/tests/AMI/simple_client.cpp index c530b63ddd3..cf551615132 100644 --- a/TAO/tests/AMI/simple_client.cpp +++ b/TAO/tests/AMI/simple_client.cpp @@ -176,12 +176,12 @@ main (int argc, char *argv[]) ACE_TRY_CHECK; } - /* + // Begin test of attributes ami_test_var->sendc_get_yadda (the_handler_var.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - + ami_test_var->sendc_set_yadda (the_handler_var.in (), 4711, ACE_TRY_ENV); @@ -190,7 +190,6 @@ main (int argc, char *argv[]) ami_test_var->sendc_get_yadda (the_handler_var.in (), ACE_TRY_ENV); ACE_TRY_CHECK; - */ // End test of attributes @@ -207,11 +206,14 @@ main (int argc, char *argv[]) "Issuing a synchronous method to collect the AMI replies\n")); } + //while (orb->work_pending()) + // orb->perform_work (); + CORBA::Long number = ami_test_var->foo (l, l, ACE_TRY_ENV); ACE_TRY_CHECK; - + //if (shutdown_flag) // ami_test_var->shutdown (); } |