diff options
author | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-02 20:55:48 +0000 |
---|---|---|
committer | naga <naga@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-05-02 20:55:48 +0000 |
commit | 1f5f1c3d618951ac0a9c3a625c1ca159395bef85 (patch) | |
tree | d75ba2e6616785717bba91b5828a97870ec5950f /TAO/orbsvcs/tests | |
parent | 93b662401a02bff5be4e9dc347d97bd439c5f282 (diff) | |
download | ATCD-1f5f1c3d618951ac0a9c3a625c1ca159395bef85.tar.gz |
Fixed double deletion of the signal handler in Command Handler class.
Diffstat (limited to 'TAO/orbsvcs/tests')
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 (); |