From 902c35a92047e5d4cc1255d7b0cd55faaf544de3 Mon Sep 17 00:00:00 2001 From: phintuka Date: Tue, 18 Aug 2009 12:30:34 +0000 Subject: Removed Stop(). Use cThread::Cancel() and cThread::Running(). --- frontend_svr.c | 27 +++++++-------------------- frontend_svr.h | 5 +---- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/frontend_svr.c b/frontend_svr.c index 2d4b7233..5463aa31 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.78 2009-08-06 11:23:31 phintuka Exp $ + * $Id: frontend_svr.c,v 1.79 2009-08-18 12:30:34 phintuka Exp $ * */ @@ -137,6 +137,8 @@ cXinelibServer::~cXinelibServer() { int i; + Cancel(-1); + CLOSESOCKET(fd_listen); CLOSESOCKET(fd_discovery); @@ -145,6 +147,8 @@ cXinelibServer::~cXinelibServer() for(i=0; i=0) - while (!GetStopSignal() && fds>=0) { + while (Running() && fds>=0) { fds = 0; if(fd_listen>=0) { @@ -1788,7 +1775,7 @@ void cXinelibServer::Action(void) if(err < 0) { LOGERR("cXinelibServer: poll failed"); - if(!GetStopSignal()) + if(Running()) cCondWait::SleepMs(100); } else if(err == 0) { diff --git a/frontend_svr.h b/frontend_svr.h index 73117944..1c657f42 100644 --- a/frontend_svr.h +++ b/frontend_svr.h @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.h,v 1.23 2009-03-20 07:20:53 phintuka Exp $ + * $Id: frontend_svr.h,v 1.24 2009-08-18 12:30:34 phintuka Exp $ * */ @@ -34,9 +34,6 @@ class cXinelibServer : public cXinelibThread cXinelibServer(int listen_port); virtual ~cXinelibServer(); - // Thread control - virtual void Stop(void); - protected: virtual void Action(void); -- cgit v1.2.3