summaryrefslogtreecommitdiff
path: root/TAO/tao/MProfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/MProfile.cpp')
-rw-r--r--TAO/tao/MProfile.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/TAO/tao/MProfile.cpp b/TAO/tao/MProfile.cpp
index 59e25c0bfb7..94fb9e4dbf0 100644
--- a/TAO/tao/MProfile.cpp
+++ b/TAO/tao/MProfile.cpp
@@ -364,4 +364,19 @@ TAO_MProfile::policy_list (ACE_ENV_SINGLE_ARG_DECL)
return ret_val;
}
+int
+TAO_MProfile::give_shared_profile (TAO_Profile *pfile)
+{
+ for (unsigned i = 0; i < this->last_; i++)
+ if (pfile->tag() == this->pfiles_[i]->tag() &&
+ pfile->compare_key(this->pfiles_[i]))
+ {
+ this->pfiles_[i]->add_generic_endpoint(pfile->endpoint());
+ pfile->_decr_refcnt();
+ return i;
+ }
+ return this->give_profile(pfile,0);
+}
+
+
TAO_END_VERSIONED_NAMESPACE_DECL