summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-02 20:55:48 +0000
committernaga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-05-02 20:55:48 +0000
commit62fd604b48d96e29ee2210166ab02a844fefd29f (patch)
treed75ba2e6616785717bba91b5828a97870ec5950f
parent54745a7afe4aca5b6ffab529598174282ab99c89 (diff)
downloadATCD-62fd604b48d96e29ee2210166ab02a844fefd29f.tar.gz
Fixed double deletion of the signal handler in Command Handler class.
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp24
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp8
-rw-r--r--TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp2
3 files changed, 15 insertions, 19 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp
index 6164b8bf440..dfd21ba020e 100644
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.cpp
@@ -36,7 +36,7 @@ Command_Handler::Command_Handler (ACE_HANDLE command_handle)
Command_Handler::~Command_Handler (void)
{
- this->remove_handlers ();
+ // this->remove_handlers ();
if (ACE_OS::getpid () == CTRpid)
::remove_all_semaphores ();
}
@@ -530,6 +530,7 @@ Command_Handler::init_av (void)
tmp = CmdVPclearScreen;
CmdWrite(&tmp, 1);
}
+ cerr << "returning from init_av \n";
return 0;
}
cerr << "returning from init_av \n";
@@ -792,7 +793,7 @@ Command_Handler::init_audio_channel (char *audiofile)
#endif
}
abuffer->ABprocess(this->audio_data_handle_);
- this->remove_handlers ();
+ // this->remove_handlers ();
// Before shutting down the orb remove all the handlers registered with it.
ACE_DEBUG ((LM_DEBUG,"(%P|%t) Before shutdown"));
this->orb_manager_.orb ()->shutdown ();
@@ -814,16 +815,7 @@ Command_Handler::init_audio_channel (char *audiofile)
int
Command_Handler::remove_handlers (void)
{
- int result;
- result = this->client_sig_handler_.remove_handler ();
-
- if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (&this->notification_handler_,
- ACE_Event_Handler::READ_MASK) < 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- "(%P|%t) remove_handler for notification handler failed\n"),
- -1);
return 0;
-
}
void
@@ -1072,7 +1064,7 @@ Command_Handler::init_video_channel (char *videofile)
}
else
{
- this->remove_handlers ();
+ // this->remove_handlers ();
this->orb_manager_.orb ()->shutdown ();
return 1;
}
@@ -1135,7 +1127,7 @@ Command_Handler::init_video_channel (char *videofile)
}
}
ACE_OS::read (sp[0], buf, 1); /* read a garbage byte, to sync with VB */
- fprintf (stderr,"(%P|%t) Command process read a garbage bytes\n");
+ ACE_DEBUG ((LM_DEBUG,"(%P|%t) Command process read a garbage bytes\n"));
::close(sp[0]);
ACE_OS::free (buf);
}
@@ -2150,7 +2142,7 @@ Client_Sig_Handler::Client_Sig_Handler (Command_Handler *command_handler)
Client_Sig_Handler::~Client_Sig_Handler (void)
{
TAO_ORB_Core_instance ()->reactor ()->remove_handler (this,
- ACE_Event_Handler::NULL_MASK);
+ ACE_Event_Handler::NULL_MASK);
TAO_ORB_Core_instance ()->reactor ()->remove_handler (this->sig_set);
}
@@ -2198,10 +2190,10 @@ Client_Sig_Handler::remove_handler (void)
{
if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (this,
ACE_Event_Handler::NULL_MASK) == -1)
- ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler"));
+ ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler for null mask\n"));
if (TAO_ORB_Core_instance ()->reactor ()->remove_handler (sig_set) == -1)
- ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler"));
+ ACE_DEBUG ((LM_DEBUG,"(%P)remove_handler failed for client_sig handler for sig set\n"));
return 0;
}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp
index 5f5ac9e4b87..80fa1cedf07 100644
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ctr.cpp
@@ -976,13 +976,17 @@ int CTRmain(int argc,
int result = command_handler.run ();
if (ABpid == 0)
{
- ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()",ACE_OS::getpid ()));
+ ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()\n",ACE_OS::getpid ()));
ACE_Reactor::instance ()->run_event_loop ();
+ int result = TAO_ORB_Core_instance ()->reactor ()->remove_handler (&command_handler,
+ ACE_Event_Handler::READ_MASK);
+ if (result == -1)
+ ACE_DEBUG ((LM_DEBUG,"(%P)Remove handler for Command Handler failed\n"));
}
if (VBpid == 0)
{
- ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()",ACE_OS::getpid ()));
+ ACE_DEBUG ((LM_DEBUG,"(%d) Restarting the ACE_Reactor::instance ()\n",ACE_OS::getpid ()));
ACE_Reactor::instance ()->run_event_loop ();
}
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp
index 0f2ab37c5af..d8b42ba1f42 100644
--- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/vb.cpp
@@ -1111,7 +1111,7 @@ Notification_Handler::handle_input (ACE_HANDLE fd)
switch (message[0])
{
case EXIT:
- ACE_DEBUG ((LM_DEBUG,"AB process exiting because of exit signal\n"));
+ ACE_DEBUG ((LM_DEBUG,"VB process exiting because of exit signal\n"));
set_exit_routine_tag(0);
VideoBuffer::VBdeleteBuf();
ACE_Reactor::instance ()->end_event_loop ();