diff options
author | sumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-14 00:05:39 +0000 |
---|---|---|
committer | sumedh <sumedh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-14 00:05:39 +0000 |
commit | 9370bd70f94a1ae287c94a670d45bb106ab7fa52 (patch) | |
tree | 15156c86f7926e8b3a12bc33ef8616421e58bf58 | |
parent | e306edc4c779995d1fd65777097ed2cf8fa602b5 (diff) | |
download | ATCD-9370bd70f94a1ae287c94a670d45bb106ab7fa52.tar.gz |
*** empty log message ***
5 files changed, 27 insertions, 12 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 333e80782e8..a66e8a76c03 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 @@ -347,8 +347,10 @@ Command_Handler::init_video_channel (char *phostname, char *videofile) /* Initialize with VS */ { ACE_DEBUG ((LM_DEBUG, "(%P|%t) Reached line %d in %s\n", __LINE__, __FILE__)); - Video_Control::INITvideoPara_var para (new Video_Control::INITvideoPara); - Video_Control::INITvideoReply_var reply (new Video_Control::INITvideoReply); + Video_Control::INITvideoPara_var para (new + Video_Control::INITvideoPara); + Video_Control::INITvideoReply *reply_ptr = 0; + Video_Control::INITvideoReply_out reply (reply_ptr); para->sn = shared->cmdsn; para->version = VERSION; @@ -363,7 +365,7 @@ Command_Handler::init_video_channel (char *phostname, char *videofile) { CORBA::Boolean result; result = this->video_control_->init_video (para.in (), - reply.out (), + reply, TAO_TRY_ENV); TAO_CHECK_ENV; if (result == (CORBA::B_FALSE)) @@ -1491,13 +1493,16 @@ Client_Sig_Handler::handle_signal (int signum, siginfo_t *, ucontext_t *) pid = ACE_OS::wait (&status); if (pid == UIpid) { - cerr << "ui exited, im ending the event loop!" << endl; + ACE_DEBUG ((LM_DEBUG, "(%P|%t) UI process died, removing signal handlers from the reactor\n", signum)); + this->command_handler_->close (); + ACE_Reactor::instance ()->remove_handler (this->sig_set); ACE_Reactor::instance ()->end_event_loop (); } return 0; case SIGINT: - ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S\n", signum)); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) received signal %S, removing signal handlers from the reactor\n", signum)); this->command_handler_->close (); + ACE_Reactor::instance ()->remove_handler (this->sig_set); ACE_Reactor::instance ()->end_event_loop (); return 0; default: diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp index b4445040689..94aa88dbd77 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.cpp @@ -788,7 +788,7 @@ Video_Global::SendReferences (int group, int frame) this->cmd = orgcmd; } -void +int Video_Global::GetFeedBack () { VideoFeedBackPara para; @@ -800,7 +800,7 @@ Video_Global::GetFeedBack () /* SFprintf (stderr, "VS warning: a FB this->packet discarded.\n"); */ - return; + return -1; } #ifdef NeedByteOrderConversion para.this->needHeader = ntohl (para.this->needHeader); @@ -812,7 +812,7 @@ Video_Global::GetFeedBack () this->frameRateLimit = para.frameRateLimit1000 / 1000.0; this->sendPatternGops = para.sendPatternGops; - if (!Video_Timer_Global::timerOn) return; + if (!Video_Timer_Global::timerOn) return 0; this->needHeader = para.needHeader; memcpy (this->sendPattern, para.sendPattern, PATTERN_SIZE); @@ -831,6 +831,8 @@ Video_Global::GetFeedBack () SFprintf (stderr, "VS fb: addf %d, addupf %d\n", para.addFrames, para.addUsecPerFrame); */ + + return 0; } int diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h index 017ad94e96b..5c62c74936a 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h @@ -275,7 +275,7 @@ public: int SendReferences (int group, int frame); int send_to_network (int timeToUse); int first_packet_send_to_network (int timeToUse); - void GetFeedBack (void); + int GetFeedBack (void); int SendPicture (int *frame); int ReadInfoFromFile (void); void WriteInfoToFile (void); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp index 5536a72c83d..3f8c83f889e 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.cpp @@ -162,7 +162,13 @@ Video_Data_Handler::handle_input (ACE_HANDLE handle) switch (this->vci_->get_state ()->get_state ()) { case Video_Control_State::VIDEO_PLAY: - VIDEO_SINGLETON::instance ()->GetFeedBack (); + if (VIDEO_SINGLETON::instance ()->GetFeedBack () == -1) + { + ACE_DEBUG ((LM_DEBUG, "(%P|%t) Error reading feedback. Ending the reactor event loop\n")); + TAO_ORB_Core_instance ()-> orb ()->shutdown (); + return -1; + } + VIDEO_SINGLETON::instance ()->play_send (); // simulating the for loop in playvideo () in vs.cpp break; case Video_Control_State::VIDEO_FAST_FORWARD: diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp index 67b8392acb1..28e90998eae 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.cpp @@ -117,6 +117,7 @@ AV_Svc_Handler::handle_connection (ACE_HANDLE) "(%P|%t), ACK send failed: %p", "AV_Svc_Handler::handle_connection"), -1); + ACE_DEBUG ((LM_DEBUG, "(%P|%t) %s:%d\n", __FILE__, __LINE__)); } // close down the connected socket in the main process this->destroy (); @@ -142,14 +143,15 @@ AV_Svc_Handler::handle_connection (ACE_HANDLE) ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t) Audio_Server init failed ()\n"),-1); result = as_->run (); // ACE_Reactor::instance ()->end_event_loop (); - TAO_ORB_Core_instance ()->reactor ()->end_event_loop (); + TAO_ORB_Core_instance ()->orb ()-> shutdown (); if (result != 0) ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t)handle_connection : "), + "(%P|%t) handle_connection : %d\n"), result); return result; break; default: + this->destroy (); return 0; } break; |