diff options
Diffstat (limited to 'TAO/tao/DynamicInterface/Request.cpp')
-rw-r--r-- | TAO/tao/DynamicInterface/Request.cpp | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index 34519883c93..799870a0f64 100644 --- a/TAO/tao/DynamicInterface/Request.cpp +++ b/TAO/tao/DynamicInterface/Request.cpp @@ -47,7 +47,7 @@ CORBA::Request::_decr_refcnt (void) this->lock_, 0); - --this->refcount_; + this->refcount_--; if (this->refcount_ != 0) { @@ -128,7 +128,7 @@ CORBA::Request::~Request (void) ACE_ASSERT (refcount_ == 0); ::CORBA::release (this->target_); - ::CORBA::string_free ((char*) this->opname_); + CORBA::string_free ((char*) this->opname_); this->opname_ = 0; ::CORBA::release (this->args_); ::CORBA::release (this->result_); @@ -144,8 +144,12 @@ CORBA::Request::~Request (void) void CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) { + const CORBA::Boolean argument_flag = + this->args_->_lazy_has_arguments (); + TAO::NamedValue_Argument _tao_retval (this->result_); + TAO::NVList_Argument _tao_in_list (this->args_, this->lazy_evaluation_); @@ -154,10 +158,17 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) &_tao_in_list }; + int number_args = 0; + + if (argument_flag) + number_args = 2; + else + number_args = 1; + TAO::DII_Invocation_Adapter _tao_call ( this->target_, _tao_arg_list, - sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), + number_args, this->opname_, static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), this->exceptions_.in (), @@ -178,8 +189,12 @@ CORBA::Request::invoke (ACE_ENV_SINGLE_ARG_DECL) void CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL) { + const CORBA::Boolean argument_flag = + this->args_->_lazy_has_arguments (); + TAO::NamedValue_Argument _tao_retval (this->result_); + TAO::NVList_Argument _tao_in_list (this->args_, this->lazy_evaluation_); @@ -188,10 +203,17 @@ CORBA::Request::send_oneway (ACE_ENV_SINGLE_ARG_DECL) &_tao_in_list }; + int number_args = 0; + + if (argument_flag) + number_args = 2; + else + number_args = 1; + TAO::Invocation_Adapter _tao_call ( this->target_, _tao_arg_list, - sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), + number_args, this->opname_, static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), 0, @@ -213,9 +235,10 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) ace_mon, this->lock_); - this->response_received_ = false; + this->response_received_ = 0; } - CORBA::Boolean const argument_flag = this->args_->count () ? true : false; + + const CORBA::Boolean argument_flag = this->args_->count () ? 1 : 0; TAO::NamedValue_Argument _tao_retval (this->result_); @@ -227,7 +250,7 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) &_tao_in_list }; - size_t number_args = 0; + int number_args = 0; if (argument_flag) number_args = 2; @@ -320,7 +343,7 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming, ace_mon, this->lock_); - this->response_received_ = true; + this->response_received_ = 1; } break; |