diff options
Diffstat (limited to 'TAO/tao/IIOP_Acceptor.cpp')
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 71b713f35ee..1c1f16cc81f 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -85,12 +85,27 @@ TAO_IIOP_Acceptor::~TAO_IIOP_Acceptor (void) // 2) For V1.[1,2] there are tagged components int TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile &mprofile) + TAO_MProfile &mprofile, + CORBA::Boolean share_profile) { // Sanity check. if (this->endpoint_count_ == 0) return -1; + // Check if multiple endpoints should be put in one profile or + // if they should be spread across multiple profiles. + if (share_profile == 1) + return this->create_shared_profile (object_key, + mprofile); + else + return this->create_new_profiles (object_key, + mprofile); +} + +int +TAO_IIOP_Acceptor::create_new_profiles (const TAO_ObjectKey &object_key, + TAO_MProfile &mprofile) +{ // Adding this->endpoint_count_ to the TAO_MProfile. int count = mprofile.profile_count (); if ((mprofile.size () - count) < this->endpoint_count_ @@ -134,8 +149,8 @@ TAO_IIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key, } int -TAO_IIOP_Acceptor::create_endpoint_for_mprofile (const TAO_ObjectKey &object_key, - TAO_MProfile &mprofile) +TAO_IIOP_Acceptor::create_shared_profile (const TAO_ObjectKey &object_key, + TAO_MProfile &mprofile) { size_t index = 0; TAO_Profile *pfile = 0; |