summaryrefslogtreecommitdiff
path: root/TAO/tao/UIOP_Acceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/UIOP_Acceptor.cpp')
-rw-r--r--TAO/tao/UIOP_Acceptor.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp
index e19d3cf51e4..2a8416a9c37 100644
--- a/TAO/tao/UIOP_Acceptor.cpp
+++ b/TAO/tao/UIOP_Acceptor.cpp
@@ -39,11 +39,35 @@ TAO_UIOP_Acceptor::TAO_UIOP_Acceptor (void)
}
TAO_Profile *
-TAO_UIOP_Acceptor::create_profile (TAO_ObjectKey &)
+TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key,
+ TAO_MProfile *&mprofile)
{
+ ACE_UNIX_Addr new_address;
+
+ if (base_acceptor_.acceptor ().get_local_addr (new_address) == -1)
+ return 0;
+
+ // we only make one
+ int count = mprofile->profile_count ();
+ if ((mprofile->size () - count) < 1)
+ {
+ if (mprofile->grow (count + 1) == -1)
+ return -1;
+ }
+
+ TAO_UIOP_Profile pfile;
+ ACE_NEW_RETURN (pfile
+ TAO_UIOP_Profile (new_address, object_key),
+ -1);
+
+ if (mprofile->give_profile (pfile) == -1)
+ return -1;
+
return 0;
}
+}
+
int
TAO_UIOP_Acceptor::is_collocated (const TAO_Profile* pfile)
{