summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 22:12:49 +0000
committeryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-09 22:12:49 +0000
commitceb12b0c083e1adc588136b5ef5bdfb5633c804b (patch)
tree5839629675e327629c9b469b3367a61ee20383f3
parentcad6d4873ac49ba55ae359c7d1fd07045b8769c3 (diff)
downloadATCD-ceb12b0c083e1adc588136b5ef5bdfb5633c804b.tar.gz
*** empty log message ***
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp46
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp95
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h7
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp101
-rw-r--r--TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h8
5 files changed, 145 insertions, 112 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
index e8ca7506818..bff3f9cf0b4 100644
--- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.cpp
@@ -173,44 +173,6 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,
CORBA::Boolean met_qos;
CORBA::String_var named_vdev;
- // "AV/AVStreams_i.cpp", line 183: Warning (Anachronism): Temporary used for non-const reference, now obsolete.
- // "AV/AVStreams_i.cpp", line 183: Note: Type "CC -migration" for more on anachronisms.
- // "AV/AVStreams_i.cpp", line 183: Warning (Anachronism): The copy constructor for argument the_vdev of type AVStreams::VDev_out should take const AVStreams::VDev_out&.
- // "AV/AVStreams_i.cpp", line 198: Warning (Anachronism): Temporary used for non-const reference, now obsolete.
- // "AV/AVStreams_i.cpp", line 198: Warning (Anachronism): The copy constructor for argument the_vdev of type AVStreams::VDev_out should take const AVStreams::VDev_out&.
- // 4 Warning(s) detected.
- // To overcome the above warning we define _out variable for the
- // vdev and use them instead .out ().
-
-#if defined (__SUNPRO_CC)
- AVStreams::VDev_out vdev_a_out (this->vdev_a_);
- AVStreams::VDev_out vdev_b_out (this->vdev_b_);
-
- this->stream_endpoint_a_ =
- a_party-> create_A (this->_this (env),
- vdev_a_out,
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) TAO_StreamCtrl::create_A: succeeded\n"));
-
- // Request b_party to create the endpoint and vdev
-
- this->stream_endpoint_b_ =
- b_party-> create_B (this->_this (env),
- vdev_b_out,
- the_qos,
- met_qos,
- named_vdev.inout (),
- the_flows,
- env);
- TAO_CHECK_ENV_RETURN (env, 1);
-#else /* !__SUNPRO_CC */
this->stream_endpoint_a_ =
a_party-> create_A (this->_this (env),
this->vdev_a_.out (),
@@ -236,13 +198,11 @@ TAO_StreamCtrl::bind_devs (AVStreams::MMDevice_ptr a_party,
env);
TAO_CHECK_ENV_RETURN (env, 1);
-#endif /* !__SUNPRO_CC */
-
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) TAO_StreamCtrl::create_B: succeeded\n"));
ACE_DEBUG ((LM_DEBUG,
- "\nstream_endpoint_b_ = %s",
+ "\n(%P|%t)stream_endpoint_b_ = %s",
TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_.in (),
env)));
TAO_CHECK_ENV_RETURN (env, 1);
@@ -487,7 +447,7 @@ TAO_StreamEndPoint::set_source_id (CORBA::Long source_id,
TAO_StreamEndPoint::~TAO_StreamEndPoint (void)
{
- this->handle_close ();
+ //this->handle_close ();
}
// ----------------------------------------------------------------------
@@ -653,7 +613,7 @@ TAO_VDev::set_peer (AVStreams::StreamCtrl_ptr the_ctrl,
if (anyptr != 0)
{
*anyptr >>= media_ctrl_ior;
- ACE_DEBUG ((LM_DEBUG,"The Media Control IOR is %s\n",
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)The Media Control IOR is %s\n",
media_ctrl_ior));
}
CORBA::Object_ptr media_ctrl_obj =
diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
index 8f3313aae33..91519fcca87 100644
--- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.cpp
@@ -30,14 +30,14 @@ TAO_AV_Endpoint_Strategy::TAO_AV_Endpoint_Strategy (void)
// Destructor.
TAO_AV_Endpoint_Strategy::~TAO_AV_Endpoint_Strategy (void)
{
- if (CORBA::is_nil (this->stream_endpoint_a_) == 0)
- CORBA::release (this->stream_endpoint_a_);
+// if (CORBA::is_nil (this->stream_endpoint_a_) == 0)
+// CORBA::release (this->stream_endpoint_a_);
- if (CORBA::is_nil (this->stream_endpoint_b_) == 0)
- CORBA::release (this->stream_endpoint_b_);
+// if (CORBA::is_nil (this->stream_endpoint_b_) == 0)
+// CORBA::release (this->stream_endpoint_b_);
- if (CORBA::is_nil (this->stream_endpoint_b_) == 0)
- CORBA::release (this->vdev_);
+// if (CORBA::is_nil (this->stream_endpoint_b_) == 0)
+// CORBA::release (this->vdev_);
}
@@ -76,8 +76,11 @@ TAO_AV_Endpoint_Strategy::create_B (AVStreams::StreamEndPoint_B_ptr &stream_endp
// Constructor
TAO_AV_Endpoint_Process_Strategy::TAO_AV_Endpoint_Process_Strategy (ACE_Process_Options *process_options)
- : process_options_ (process_options)
+ : process_options_ (process_options),
+ pid_ (-1)
{
+ ACE_OS::hostname (this->host_,
+ sizeof this->host_);
}
// Destructor.
@@ -95,10 +98,10 @@ TAO_AV_Endpoint_Process_Strategy::activate (void)
ACE_Process process;
// Create a new process to contain this endpoint
- pid_t pid = process.spawn (*this->process_options_);
+ this->pid_ = process.spawn (*this->process_options_);
// Process creation failed
- if (pid == -1)
+ if (this->pid_ == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) ACE_Process:: spawn failed: %p\n",
"spawn"),
@@ -106,16 +109,13 @@ TAO_AV_Endpoint_Process_Strategy::activate (void)
// Create a unique semaphore name, using my hostname, and pid.
char sem_str [BUFSIZ];
- char host [MAXHOSTNAMELEN];
- ACE_OS::hostname (host,
- sizeof host);
// create a unique semaphore name
ACE_OS::sprintf (sem_str,
"%s:%s:%ld",
"TAO_AV_Process_Semaphore",
- host,
- pid);
+ this->host_,
+ this->pid_);
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) semaphore is %s\n",
@@ -131,7 +131,7 @@ TAO_AV_Endpoint_Process_Strategy::activate (void)
if (semaphore.acquire () == -1)
{
// See if my child process is still alive -- if not, return an error
- if (ACE_OS::kill (pid,
+ if (ACE_OS::kill (this->pid_,
0) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
"(%P|%t) Process_Strategy: Process being waited on died unexpectedly.\n"),
@@ -201,12 +201,20 @@ TAO_AV_Endpoint_Process_Strategy::bind_to_naming_service (CORBA::Environment &en
int
TAO_AV_Endpoint_Process_Strategy::get_vdev (CORBA::Environment &env)
{
+ char vdev_name [BUFSIZ];
+ ACE_OS::sprintf (vdev_name,
+ "%s:%s:%d",
+ "VDev",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",vdev_name));
+
// Create the name
CosNaming::Name VDev_Name (1);
VDev_Name.length (1);
- VDev_Name [0].id = CORBA::string_dup
- ("VDev");
-
+ VDev_Name [0].id = CORBA::string_dup (vdev_name);
+
// Get the CORBA::Object
CORBA::Object_var vdev =
this->naming_context_->resolve (VDev_Name,
@@ -265,12 +273,20 @@ TAO_AV_Endpoint_Process_Strategy_A::create_A (AVStreams::StreamEndPoint_A_ptr &s
int
TAO_AV_Endpoint_Process_Strategy_A::get_stream_endpoint (CORBA::Environment &env)
{
+ char stream_endpoint_name[BUFSIZ];
+ ACE_OS::sprintf (stream_endpoint_name,
+ "%s:%s:%d",
+ "Stream_Endpoint_A",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
+
// Create the name
CosNaming::Name Stream_Endpoint_A_Name (1);
Stream_Endpoint_A_Name.length (1);
- Stream_Endpoint_A_Name [0].id = CORBA::string_dup
- ("Stream_Endpoint_A");
+ Stream_Endpoint_A_Name [0].id = CORBA::string_dup (stream_endpoint_name);
// Get the CORBA::Object
CORBA::Object_var stream_endpoint_a =
@@ -313,27 +329,46 @@ TAO_AV_Endpoint_Process_Strategy_B::create_B (AVStreams::StreamEndPoint_B_ptr &s
AVStreams::VDev_ptr &vdev,
CORBA::Environment &env)
{
- if (this->activate () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
- -1);
-
- stream_endpoint = this->stream_endpoint_b_;
- vdev = this->vdev_;
+ TAO_TRY
+ {
+ if (this->activate () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
+ -1);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Process_Strategy_B::create_B ()\n: stream_endpoint is:%s\n",
+ TAO_ORB_Core_instance ()->orb ()->object_to_string (this->stream_endpoint_b_,
+ TAO_TRY_ENV)));
+ stream_endpoint = this->stream_endpoint_b_;
+ vdev = this->vdev_;
+ }
+ TAO_CATCHANY
+ {
+ TAO_TRY_ENV.print_exception ("TAO_AV_Endpoint_Process_Strategy_B::create_B\n");
+ return -1;
+ }
return 0;
-
+ TAO_ENDTRY;
}
// Gets the B type stream_endpoint from the Naming service
int
TAO_AV_Endpoint_Process_Strategy_B::get_stream_endpoint (CORBA::Environment &env)
{
+ char stream_endpoint_name[BUFSIZ];
+ ACE_OS::sprintf (stream_endpoint_name,
+ "%s:%s:%d",
+ "Stream_Endpoint_B",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
+
// Create the name
CosNaming::Name Stream_Endpoint_B_Name (1);
Stream_Endpoint_B_Name.length (1);
- Stream_Endpoint_B_Name [0].id = CORBA::string_dup
- ("Stream_Endpoint_B");
+ Stream_Endpoint_B_Name [0].id = CORBA::string_dup (stream_endpoint_name);
// Get the CORBA::Object reference
CORBA::Object_var stream_endpoint_b =
diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h
index c08e7aa6085..22b68d9a8ac 100644
--- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h
+++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h
@@ -92,9 +92,14 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy
CosNaming::NamingContext_var naming_context_;
// Naming context
- private:
ACE_Process_Options *process_options_;
// Name and arguments for the process to be created
+
+ char host_[MAXHOSTNAMELEN];
+ // name of this host used for resolving unique names.
+
+ pid_t pid_;
+ // My child's process id.
};
diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp
index fc8ea5a2866..1aeee3b397e 100644
--- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp
+++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.cpp
@@ -19,8 +19,6 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::TAO_A
template <class T_StreamEndpoint, class T_VDev, class T_MediaCtrl>
TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::~TAO_AV_Endpoint_Reactive_Strategy (void)
{
- if (this->orb_manager_ != 0)
- delete this->orb_manager_;
}
// Create, activate the objects with the POA
@@ -32,15 +30,15 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activ
{
this->activate_stream_endpoint (TAO_TRY_ENV);
TAO_CHECK_ENV;
- ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy::activated stream_endpoint\n"));
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated stream_endpoint\n"));
this->activate_vdev (TAO_TRY_ENV);
TAO_CHECK_ENV;
- ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy::activated vdev\n"));
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated vdev\n"));
this->activate_mediactrl (TAO_TRY_ENV);
TAO_CHECK_ENV;
- ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy::activated mediactrl\n"));
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activated mediactrl\n"));
}
TAO_CATCHANY
{
@@ -62,9 +60,11 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activ
return -1;
// Put the object in the POA
- this->orb_manager_->activate (vdev,
- env);
+ CORBA::String_var vdev_ior = this->orb_manager_->activate (vdev,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activate_vdev, vdev ior is:%s\n",
+ vdev_ior. in ()));
// Save the object reference, so that create_A can return it
this->vdev_ = vdev->_this (env);
@@ -85,9 +85,12 @@ TAO_AV_Endpoint_Reactive_Strategy <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activ
return -1;
// Put the object in the POA
- this->orb_manager_->activate (media_ctrl,
- env);
+ CORBA::String_var mediactrl_ior = this->orb_manager_->activate (media_ctrl,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Endpoint_Reactive_Strategy::activate_mediactrl , media_ctrl ior is :%s\n",
+ mediactrl_ior.in ()));
+
// Associate the media controller object reference with the vdev, as per the OMG spec
CORBA::Any anyval;
@@ -111,6 +114,7 @@ TAO_AV_Endpoint_Reactive_Strategy<T_StreamEndpoint, T_VDev, T_MediaCtrl>::make_s
{
ACE_NEW_RETURN (stream_endpoint,
T_StreamEndpoint,
+
-1);
return 0;
}
@@ -186,9 +190,10 @@ TAO_AV_Endpoint_Reactive_Strategy_A <T_StreamEndpoint, T_VDev, T_MediaCtrl>::act
if (this->make_stream_endpoint (stream_endpoint_a) == -1)
return -1;
- this->orb_manager_->activate (stream_endpoint_a,
- env);
+ CORBA::String_var stream_endpoint_ior = this->orb_manager_->activate (stream_endpoint_a,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy_A::activate_stream_endpoint,Stream Endpoint ior is : %s\n",stream_endpoint_ior.in ()));
// Save the object references, so that create_a can return them
this->stream_endpoint_a_ = stream_endpoint_a->_this (env);
@@ -223,9 +228,10 @@ TAO_AV_Endpoint_Reactive_Strategy_B <T_StreamEndpoint, T_VDev, T_MediaCtrl>::act
if (this->make_stream_endpoint (stream_endpoint_b) == -1)
return -1;
- this->orb_manager_->activate (stream_endpoint_b,
- env);
+ CORBA::String_var stream_endpoint_ior = this->orb_manager_->activate (stream_endpoint_b,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"TAO_AV_Endpoint_Reactive_Strategy_B::activate_stream_endpoint,Stream Endpoint ior is : %s\n",stream_endpoint_ior.in ()));
this->stream_endpoint_b_ = stream_endpoint_b->_this (env);
TAO_CHECK_ENV_RETURN (env, -1);
@@ -258,8 +264,14 @@ TAO_AV_Endpoint_Reactive_Strategy_B<T_StreamEndpoint, T_VDev, T_MediaCtrl>::crea
// Constructor
template <class T_StreamEndpoint_B, class T_VDev , class T_MediaCtrl>
TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::TAO_AV_Child_Process ()
- : stream_endpoint_name_ (0)
+ : stream_endpoint_name_ (0),
+ pid_ (-1)
{
+ this->pid_ = ACE_OS::getpid ();
+ if (this->pid_ == 0)
+ ACE_ERROR ((LM_ERROR,"getpid () failed\n"));
+ ACE_OS::hostname (this->host_,
+ sizeof this->host_);
}
// Initializes the ORB, activates the objects, and release the semaphore
@@ -329,21 +341,23 @@ TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::activate_objects
return -1;
// activate the stream_endpoint
- this->orb_manager_.activate (this->stream_endpoint_,
- env);
+ CORBA::String_var stream_endpoint_ior = this->orb_manager_.activate (this->stream_endpoint_,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
-
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Child_Process::activate_objects,stream_endpoint_ior :%s\n",stream_endpoint_ior.in ()));
// activate the vdev
- this->orb_manager_.activate (this->vdev_,
- env);
+ CORBA::String_var vdev_ior = this->orb_manager_.activate (this->vdev_,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Child_Process::activate_objects, vdev ior is :%s\n",vdev_ior.in ()));
// activate the media controller
- this->orb_manager_.activate (this->media_ctrl_,
- env);
+ CORBA::String_var media_ctrl_ior = this->orb_manager_.activate (this->media_ctrl_,
+ env);
TAO_CHECK_ENV_RETURN (env, -1);
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)TAO_AV_Child_Process::activate_objects,media_ctrl_ior is: %s\n",media_ctrl_ior.in ()));
return 0;
@@ -375,9 +389,17 @@ template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
int
TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::register_vdev (CORBA::Environment &env)
{
+ char vdev_name [BUFSIZ];
+ ACE_OS::sprintf (vdev_name,
+ "%s:%s:%d",
+ "VDev",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",vdev_name));
// create the name
this->vdev_name_.length (1);
- this->vdev_name_ [0].id = CORBA::string_dup ("VDev");
+ this->vdev_name_ [0].id = CORBA::string_dup (vdev_name);
// make the media controller a property of the vdev
CORBA::Any media_ctrl_property;
@@ -433,23 +455,12 @@ int
TAO_AV_Child_Process <T_StreamEndpoint_B, T_VDev, T_MediaCtrl>::release_semaphore ()
{
char sem_str [BUFSIZ];
- char host [MAXHOSTNAMELEN];
- pid_t pid;
- // make the semaphore name
- if ((pid = ACE_OS::getpid ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) Unable to get my pid!\n"),
- -1);
-
- ACE_OS::hostname (host,
- sizeof host);
-
sprintf (sem_str,
"%s:%s:%d",
"TAO_AV_Process_Semaphore",
- host,
- pid);
+ this->host_,
+ this->pid_);
ACE_DEBUG ((LM_DEBUG,
"(%P|%t) semaphore is %s\n",
@@ -574,8 +585,16 @@ TAO_AV_Child_Process <T_StreamEndpoint, T_VDev, T_MediaCtrl>::~TAO_AV_Child_Pro
template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
TAO_AV_Child_Process_A <T_StreamEndpoint, T_VDev, T_MediaCtrl>::TAO_AV_Child_Process_A ()
{
+ char stream_endpoint_name[BUFSIZ];
+ ACE_OS::sprintf (stream_endpoint_name,
+ "%s:%s:%d",
+ "Stream_Endpoint_A",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
this->stream_endpoint_name_.length (1);
- this->stream_endpoint_name_ [0].id = CORBA::string_dup ("Stream_Endpoint_A");
+ this->stream_endpoint_name_ [0].id = CORBA::string_dup (stream_endpoint_name);
}
template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
@@ -592,8 +611,16 @@ TAO_AV_Child_Process_A <T_StreamEndpoint, T_VDev, T_MediaCtrl>::~TAO_AV_Child_P
template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
TAO_AV_Child_Process_B <T_StreamEndpoint, T_VDev, T_MediaCtrl>::TAO_AV_Child_Process_B ()
{
+ char stream_endpoint_name[BUFSIZ];
+ ACE_OS::sprintf (stream_endpoint_name,
+ "%s:%s:%d",
+ "Stream_Endpoint_B",
+ this->host_,
+ this->pid_);
+
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));
this->stream_endpoint_name_.length (1);
- this->stream_endpoint_name_ [0].id = CORBA::string_dup ("Stream_Endpoint_B");
+ this->stream_endpoint_name_ [0].id = CORBA::string_dup (stream_endpoint_name);
}
template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h
index 73155c34ebf..da3ffcad393 100644
--- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h
+++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h
@@ -9,7 +9,7 @@ template <class T_StreamEndpoint, class T_VDev , class T_MediaCtrl>
class TAO_ORBSVCS_Export TAO_AV_Endpoint_Reactive_Strategy
: public TAO_AV_Endpoint_Strategy
// = DESCRIPTION
-// Reactive strategy base clas
+// Reactive strategy base class
{
protected:
TAO_AV_Endpoint_Reactive_Strategy (TAO_ORB_Manager *orb_manager);
@@ -171,6 +171,12 @@ public:
T_MediaCtrl *media_ctrl_;
// Media controller
+
+ pid_t pid_;
+ // pid of this process
+
+ char host_[MAXHOSTNAMELEN];
+ // Name of the host.
};
// ----------------------------------------------------------------------