diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-11-08 08:36:33 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-11-08 08:36:33 +0000 |
commit | 472c117c9a53532b90502afd031f5b5ba2c382ae (patch) | |
tree | 336f0b68eb10dc70fc881f9ef3519a6eb0afc265 /TAO/tao/DynamicInterface | |
parent | 3ddaa9791c25e342e08eea9ed34d9995db01198c (diff) | |
download | ATCD-472c117c9a53532b90502afd031f5b5ba2c382ae.tar.gz |
Wed Nov 8 07:31:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/DynamicInterface')
-rw-r--r-- | TAO/tao/DynamicInterface/Context.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/DynamicInterface/DII_Arguments.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/DynamicInterface/Request.cpp | 39 |
4 files changed, 17 insertions, 40 deletions
diff --git a/TAO/tao/DynamicInterface/Context.cpp b/TAO/tao/DynamicInterface/Context.cpp index 3edab19588b..f437ba7fb80 100644 --- a/TAO/tao/DynamicInterface/Context.cpp +++ b/TAO/tao/DynamicInterface/Context.cpp @@ -35,7 +35,7 @@ CORBA::Context::_incr_refcnt (void) CORBA::ULong CORBA::Context::_decr_refcnt (void) { - const CORBA::ULong new_count = --this->refcount_; + CORBA::ULong const new_count = --this->refcount_; if (new_count == 0) delete this; @@ -118,7 +118,7 @@ CORBA::ContextList::~ContextList (void) { for (CORBA::ULong i = 0; i < this->count (); ++i) { - char **ctx; + char **ctx = 0; if (this->ctx_list_.get (ctx, i) == -1) { @@ -175,7 +175,7 @@ CORBA::ContextList::_duplicate (void) void CORBA::ContextList::_destroy (void) { - CORBA::ULong current = --this->ref_count_; + CORBA::ULong const current = --this->ref_count_; if (current == 0) { @@ -186,13 +186,13 @@ CORBA::ContextList::_destroy (void) void CORBA::ContextList::_incr_refcnt (void) { - this->ref_count_++; + ++this->ref_count_; } void CORBA::ContextList::_decr_refcnt (void) { - this->ref_count_--; + --this->ref_count_; if (this->ref_count_ != 0) { diff --git a/TAO/tao/DynamicInterface/DII_Arguments.cpp b/TAO/tao/DynamicInterface/DII_Arguments.cpp index d72c4f43420..3118f59a81d 100644 --- a/TAO/tao/DynamicInterface/DII_Arguments.cpp +++ b/TAO/tao/DynamicInterface/DII_Arguments.cpp @@ -108,7 +108,7 @@ namespace TAO void NVList_Argument::interceptor_paramlist (Dynamic::ParameterList *lst) { - const CORBA::ULong len = this->x_->count (); + CORBA::ULong const len = this->x_->count (); lst->length (len); for (CORBA::ULong i = 0; i < len; ++i) diff --git a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp index 7e570ba0e3f..ec8e6788bef 100644 --- a/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp +++ b/TAO/tao/DynamicInterface/DII_Arguments_Converter_Impl.cpp @@ -26,7 +26,7 @@ TAO_DII_Arguments_Converter_Impl::convert ( // in collocation case and the server expects the list of arguments // and not the NVList_Argument, we need expand the NVList_Argument // to be list of Arguments. - + // Before expanding NVList_Argument logic was added, the // $TAO_ROOT/tests/DII_Collocated_Tests/run_test.pl should fail. // The servant will get incorrect "IN" parameter from the oneway @@ -36,7 +36,7 @@ TAO_DII_Arguments_Converter_Impl::convert ( CORBA::NVList_ptr lst = static_cast<TAO::NVList_Argument *> (server_request.operation_details ()->args()[1])->arg (); - const CORBA::ULong sz = lst->count (ACE_ENV_SINGLE_ARG_PARAMETER); + CORBA::ULong const sz = lst->count (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; if (sz != nargs - 1) @@ -52,7 +52,7 @@ TAO_DII_Arguments_Converter_Impl::convert ( { CORBA::NamedValue_ptr theitem = lst->item (i ACE_ENV_ARG_PARAMETER); ACE_CHECK; - + if (!(theitem->value ()->impl ()->marshal_value (output))) { ACE_THROW (CORBA::BAD_PARAM ()); diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp index 799870a0f64..34519883c93 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,12 +144,8 @@ 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_); @@ -158,17 +154,10 @@ 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, - number_args, + sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), this->exceptions_.in (), @@ -189,12 +178,8 @@ 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_); @@ -203,17 +188,10 @@ 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, - number_args, + sizeof( _tao_arg_list ) / sizeof( TAO::Argument* ), this->opname_, static_cast<CORBA::ULong> (ACE_OS::strlen (this->opname_)), 0, @@ -235,10 +213,9 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) ace_mon, this->lock_); - this->response_received_ = 0; + this->response_received_ = false; } - - const CORBA::Boolean argument_flag = this->args_->count () ? 1 : 0; + CORBA::Boolean const argument_flag = this->args_->count () ? true : false; TAO::NamedValue_Argument _tao_retval (this->result_); @@ -250,7 +227,7 @@ CORBA::Request::send_deferred (ACE_ENV_SINGLE_ARG_DECL) &_tao_in_list }; - int number_args = 0; + size_t number_args = 0; if (argument_flag) number_args = 2; @@ -343,7 +320,7 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming, ace_mon, this->lock_); - this->response_received_ = 1; + this->response_received_ = true; } break; |