summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/UIOP_Profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/UIOP_Profile.cpp')
-rw-r--r--TAO/tao/Strategies/UIOP_Profile.cpp42
1 files changed, 13 insertions, 29 deletions
diff --git a/TAO/tao/Strategies/UIOP_Profile.cpp b/TAO/tao/Strategies/UIOP_Profile.cpp
index 5c47ed50aeb..20c24db4252 100644
--- a/TAO/tao/Strategies/UIOP_Profile.cpp
+++ b/TAO/tao/Strategies/UIOP_Profile.cpp
@@ -36,10 +36,12 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (const ACE_UNIX_Addr &addr,
const TAO_ObjectKey &object_key,
const TAO_GIOP_Message_Version &version,
TAO_ORB_Core *orb_core)
- : TAO_Profile (TAO_TAG_UIOP_PROFILE, orb_core, version),
+ : TAO_Profile (TAO_TAG_UIOP_PROFILE,
+ orb_core,
+ object_key,
+ version),
endpoint_ (addr),
- count_ (1),
- object_key_ (object_key)
+ count_ (1)
{
}
@@ -48,10 +50,12 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (const char *,
const ACE_UNIX_Addr &addr,
const TAO_GIOP_Message_Version &version,
TAO_ORB_Core *orb_core)
- : TAO_Profile (TAO_TAG_UIOP_PROFILE, orb_core, version),
+ : TAO_Profile (TAO_TAG_UIOP_PROFILE,
+ orb_core,
+ object_key,
+ version),
endpoint_ (addr),
- count_ (1),
- object_key_ (object_key)
+ count_ (1)
{
}
@@ -59,10 +63,9 @@ TAO_UIOP_Profile::TAO_UIOP_Profile (TAO_ORB_Core *orb_core)
: TAO_Profile (TAO_TAG_UIOP_PROFILE,
orb_core,
TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR,
- TAO_DEF_GIOP_MINOR)),
+ TAO_DEF_GIOP_MINOR)),
endpoint_ (),
- count_ (1),
- object_key_ ()
+ count_ (1)
{
}
@@ -447,27 +450,8 @@ TAO_UIOP_Profile::encode_endpoints (void)
== 0)
|| (out_cdr << endpoints) == 0)
return -1;
- CORBA::ULong length = out_cdr.total_length ();
-
- IOP::TaggedComponent tagged_component;
- tagged_component.tag = TAO_TAG_ENDPOINTS;
- tagged_component.component_data.length (length);
- CORBA::Octet *buf =
- tagged_component.component_data.get_buffer ();
-
- for (const ACE_Message_Block *iterator = out_cdr.begin ();
- iterator != 0;
- iterator = iterator->cont ())
- {
- CORBA::ULong i_length = iterator->length ();
- ACE_OS::memcpy (buf, iterator->rd_ptr (), i_length);
-
- buf += i_length;
- }
- // Add component with encoded endpoint data to this profile's
- // TaggedComponents.
- tagged_components_.set_component (tagged_component);
+ this->set_tagged_components (out_cdr);
return 0;
}