diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-09-29 07:07:49 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2005-09-29 07:07:49 +0000 |
commit | 24798d864eb2f338f1db804ef2f45ae5af2c7c9b (patch) | |
tree | ae5fb686454d4f2813c4a73b2753101aa3830f01 | |
parent | f56a4dfb0788e69c1a4cac340a906391ba31cb0d (diff) | |
download | ATCD-24798d864eb2f338f1db804ef2f45ae5af2c7c9b.tar.gz |
ChangeLogTag: Thu Sep 29 06:46:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp | 6 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp | 29 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h | 3 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp | 15 |
4 files changed, 34 insertions, 19 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp index 806615c64f4..6475a0d4e5c 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.cpp @@ -426,7 +426,8 @@ fill_receptacles (const char* /* type */, // Register it with the POA. offer_itr = oi->_this (ACE_ENV_SINGLE_ARG_PARAMETER); - // @@ Seth, ACE_CHECK_RETURN (what?); + ACE_CHECK_RETURN (total_offers - offers_in_iterator); + oi->_remove_ref (ACE_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (total_offers - offers_in_iterator); @@ -614,7 +615,8 @@ federated_query (const CosTrading::LinkNameSeq& links, offer_iter_collection->add_offer_iterator (offer_iter); CosTrading::PolicySeq policies_to_pass; - policies.copy_to_pass (policies_to_pass, request_id); + policies.copy_to_pass (policies_to_pass, request_id ACE_ENV_ARG_PARAMETER); + ACE_CHECK; for (int i = links.length () - 1; i >= 0; i--) { diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp index a19e9fde8f3..dd6b6090280 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp @@ -220,8 +220,8 @@ TAO_Property_Evaluator::~TAO_Property_Evaluator (void) int TAO_Property_Evaluator::is_dynamic_property (int index) { - int return_value = 0, - num_properties = this->props_.length(); + int return_value = 0; + int num_properties = this->props_.length(); // Ensure index is in bounds. if (index >= 0 && index < num_properties) @@ -232,9 +232,11 @@ TAO_Property_Evaluator::is_dynamic_property (int index) // @@ Seth, this will not work on platforms using environment variable. ACE_DECLARE_NEW_CORBA_ENV; + CORBA::Boolean equal = type->equal (CosTradingDynamic::_tc_DynamicProp + ACE_ENV_ARG_PARAMETER); + ACE_CHECK_RETURN (0); - if (type->equal (CosTradingDynamic::_tc_DynamicProp - ACE_ENV_ARG_PARAMETER)) + if (equal) return_value = 1; } @@ -250,7 +252,9 @@ TAO_Property_Evaluator::property_value (int index CORBA::Boolean in_cache = this->dp_cache_ != 0 && this->dp_cache_[index] != 0; - if (! this->is_dynamic_property (index)) + int dynamic = this->is_dynamic_property (index); + + if (!dynamic) prop_val = (CORBA::Any *) &(this->props_[index].value); else if (this->supports_dp_ && in_cache) prop_val = this->dp_cache_[index]; @@ -312,7 +316,7 @@ TAO_Property_Evaluator::property_type (int index) { // Extract type information from the DP_Struct. const CORBA::Any& value = this->props_[index].value; - CosTradingDynamic::DynamicProp* dp_struct; + CosTradingDynamic::DynamicProp* dp_struct = 0; value >>= dp_struct; // Grab a pointer to the returned_type description @@ -366,7 +370,8 @@ int TAO_Property_Evaluator_By_Name:: is_dynamic_property(const char* property_name) { - int predicate = 0, index = 0; + int predicate = 0; + int index = 0; TAO_String_Hash_Key prop_name (property_name); // If the property name is in the map, delegate evaluation to our @@ -912,7 +917,8 @@ copy_in_follow_option (CosTrading::PolicySeq& policy_seq, void TAO_Policies:: copy_to_pass (CosTrading::PolicySeq& policy_seq, - const CosTrading::Admin::OctetSeq& request_id) const + const CosTrading::Admin::OctetSeq& request_id + ACE_ENV_ARG_DECL) const { CORBA::ULong counter = 0; CosTrading::Policy* policy_buffer = @@ -943,10 +949,11 @@ copy_to_pass (CosTrading::PolicySeq& policy_seq, // We always require a hop count. if (i == HOP_COUNT) { - // @@ Seth, Same thing here, are you trying to catch the exception??? (and forget about it?) - ACE_DECLARE_NEW_CORBA_ENV; + CORBA::ULong count = this->hop_count (ACE_ENV_SINGLE_ARG_PARAMETER); + ACE_CHECK; + new_policy.name = POLICY_NAMES[HOP_COUNT]; - new_policy.value <<= this->hop_count (ACE_ENV_SINGLE_ARG_PARAMETER) - 1; + new_policy.value <<= count - 1; // Don't count hop count twice. if (this->policies_[i] == 0) diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h index 5cf6fe357b7..0fb91489fa4 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h @@ -442,7 +442,8 @@ public: /// Policies to forward to the next trader in a federated query. void copy_to_pass (CosTrading::PolicySeq& policy_seq, - const CosTrading::Admin::OctetSeq& request_id) const; + const CosTrading::Admin::OctetSeq& request_id + ACE_ENV_ARG_DECL) const; /// Policies to forward to the next trader in a directed query. void copy_to_forward (CosTrading::PolicySeq& policy_seq, diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp index b225ac9ac5f..cb65de2c7fb 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp +++ b/TAO/orbsvcs/orbsvcs/Trader/Trading_Loader.cpp @@ -163,12 +163,17 @@ TAO_Trading_Loader::fini (void) "*** Removing its link to us.\n")); if (this->bootstrapper_) - remote_link->remove_link ("Bootstrap" - ACE_ENV_ARG_PARAMETER); + { + remote_link->remove_link ("Bootstrap" + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } else - remote_link->remove_link (this->name_.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + { + remote_link->remove_link (this->name_.in () + ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } } } } |