From aa6e6ace0a86c24b83a6430219d55b023c44b615 Mon Sep 17 00:00:00 2001 From: bala Date: Sun, 16 Jul 2000 15:09:30 +0000 Subject: *** empty log message *** --- TAO/tao/Stub.i | 13 +++++--- TAO/tao/Tagged_Components.cpp | 72 +++++++++++++++++++++++++++++++++++++++++++ TAO/tao/Tagged_Components.h | 14 ++++++++- TAO/tao/Tagged_Components.i | 3 +- 4 files changed, 96 insertions(+), 6 deletions(-) diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i index afac4c0dc3e..4778a31cd23 100644 --- a/TAO/tao/Stub.i +++ b/TAO/tao/Stub.i @@ -37,10 +37,15 @@ TAO_Stub::reset_base (void) this->reset_first_locate_request (); this->profile_success_ = 0; - // Bala, add a #ifdef for TAO_HAS_FT_CORBA to look for the - // FT_TAG_PRIMARY stuff. - // Get the tagged components, check for FT_TAG_PRIMARY +#if (TAO_HAS_FT_CORBA == 0) this->set_profile_in_use_i (base_profiles_.get_next ()); +#else + + // In the FT_CORBA mode we need to get the profile with the TAG + // FT_TAG_PRIMARY. So let us go through the list of MProfiles doing + // a search for it. + +#endif /*TAO_HAS_FT_CORBA */ } ACE_INLINE void @@ -234,7 +239,7 @@ TAO_Stub::base_profiles (void) const } ACE_INLINE TAO_MProfile& -TAO_Stub::base_profiles (void) +TAO_Stub::base_profiles (void) { return this->base_profiles_; } diff --git a/TAO/tao/Tagged_Components.cpp b/TAO/tao/Tagged_Components.cpp index f0737c8beb3..9178aa3516a 100644 --- a/TAO/tao/Tagged_Components.cpp +++ b/TAO/tao/Tagged_Components.cpp @@ -170,6 +170,76 @@ TAO_Tagged_Components::set_known_component_i ( } } + +void +TAO_Tagged_Components::set_unique_component_i ( + const IOP::TaggedComponent& component) +{ + TAO_InputCDR cdr (ACE_reinterpret_cast (const char*, + component.component_data.get_buffer ()), + component.component_data.length ()); + + CORBA::Boolean byte_order; + if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) + return; + cdr.reset_byte_order (ACE_static_cast(int,byte_order)); + +# if (TAO_HAS_FT_CORBA == 1) + if (component.tag == IOP::TAG_FT_PRIMARY) + { + CORBA::Boolean primary; + if ((cdr >> primary) == 0) + return; + + this->ft_tag_primary_ = 1; + } + else if (component.tag == IOP::TAG_FT_GROUP) + { + // Revision numbers of the FT specification + CORBA::Octet ft_minor, ft_major; + + if ((cdr >> ft_major) == 0) + return; + if ((cdr >> ft_minor) == 0) + return; + + // Check for the revsion numbers + if (ft_major != TAO_DEF_FT_CORBA_MAJOR && + ft_minor != TAO_DEF_FT_CORBA_MINOR) + { + // @@Should we print out an error?? + return; + } + + // Read the FTDomainId + if (cdr.char_translator () == 0) + { + CORBA::ULong length = 0; + if (cdr.read_ulong (length)) + { + // Do not include NULL character at the end. + // @@ This is not getting demarshaled using the codeset + // translators! + this->ft_domain_id_.set (cdr.rd_ptr (), + length - 1, + 0); + cdr.skip_bytes (length); + } + } + else + { + CORBA::String_var tmp; + cdr.read_string (tmp.inout ()); + this->ft_domain_id_.set (tmp._retn (), 1); + } + + // Read the Object Group ID + + } +#endif /*TAO_HAS_FT_CORBA == 1 */ + +} + void TAO_Tagged_Components::set_component_i (const IOP::TaggedComponent& component) { @@ -267,6 +337,8 @@ TAO_Tagged_Components::decode (TAO_InputCDR& cdr) this->components_[i]; if (this->known_tag (component.tag)) this->set_known_component_i (component); + else if (this->unique_tag (component.tag)) + this->set_unique_component_i (component); } return 1; } diff --git a/TAO/tao/Tagged_Components.h b/TAO/tao/Tagged_Components.h index 0b1c589bd43..4c949270810 100644 --- a/TAO/tao/Tagged_Components.h +++ b/TAO/tao/Tagged_Components.h @@ -104,7 +104,7 @@ public: IOP::MultipleComponentProfile &components (void); // Read/Write access to the underlying // MutipleComponentProfile. Added by request from Chris Hafey - // + // private: void set_code_sets_i (CONV_FRAME::CodeSetComponent &lhs, @@ -112,6 +112,7 @@ private: // Helper method to implement set_code_sets() void set_known_component_i (const IOP::TaggedComponent& component); + void set_unique_component_i (const IOP::TaggedComponent& component); void set_component_i (const IOP::TaggedComponent& component); void set_component_i (IOP::TaggedComponent& component); void add_component_i (const IOP::TaggedComponent& component); @@ -143,6 +144,17 @@ private: // The rest of the components, to be compliant we cannot drop a // bunch of them. +# if (TAO_HAS_FT_CORBA == 1) + CORBA::Boolean ft_tag_primary_; + // Flag that indicates whether the profile is from a PRIMARY + + struct FT_Tagged_Component + { + IOP::FTDomainID ft_domain_id_; + IOP::ObjectGroupID object_group_id_; + IOP::ObjectGroupRefVersion object_group_ref_version_; + }; +#endif /*TAO_HAS_FT_CORBA */ // A flag for each component... CORBA::Octet orb_type_set_; CORBA::Octet code_sets_set_; diff --git a/TAO/tao/Tagged_Components.i b/TAO/tao/Tagged_Components.i index da5b23331ba..5d88f90afe1 100644 --- a/TAO/tao/Tagged_Components.i +++ b/TAO/tao/Tagged_Components.i @@ -70,10 +70,11 @@ TAO_Tagged_Components::unique_tag (IOP::ComponentId tag) const || tag == IOP::TAG_SSL_SEC_TRANS || tag == IOP::TAG_CSI_ECMA_Public_SEC_MECH || tag == IOP::TAG_GENERIC_SEC_MECH - || tag == IOP::TAG_COMPLETE_OBJECT_KEY || tag == IOP::TAG_ENDPOINT_ID_POSITION || tag == IOP::TAG_LOCATION_POLICY + || tag == IOP::TAG_FT_PRIMARY + || tag == IOP::TAG_FT_GROUP || tag == IOP::TAG_DCE_STRING_BINDING || tag == IOP::TAG_DCE_BINDING_NAME || tag == IOP::TAG_DCE_NO_PIPES -- cgit v1.2.1