summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-09-24 12:54:47 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-09-24 12:54:47 +0200
commit2d68b323c74f3ba2d03d843132ebcec1d712b982 (patch)
treee96d6e46b37c085fdab1245f7cb49bf14ba837e2 /thread.c
parent0b8cee6f2ae4a3709cf7b5d95c716060d758a1ea (diff)
downloadvdr-2d68b323c74f3ba2d03d843132ebcec1d712b982.tar.gz
vdr-2d68b323c74f3ba2d03d843132ebcec1d712b982.tar.bz2
The function cThread::Cancel() now only sets 'running' to false and does not actually kill the thread if the special value -1 is given
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/thread.c b/thread.c
index 8b6e58f4..2e145e50 100644
--- a/thread.c
+++ b/thread.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: thread.c 1.57 2006/08/20 10:20:44 kls Exp $
+ * $Id: thread.c 1.58 2006/09/24 12:54:47 kls Exp $
*/
#include "thread.h"
@@ -293,7 +293,7 @@ bool cThread::Active(void)
void cThread::Cancel(int WaitSeconds)
{
running = false;
- if (active) {
+ if (active && WaitSeconds > -1) {
if (WaitSeconds > 0) {
for (time_t t0 = time(NULL) + WaitSeconds; time(NULL) < t0; ) {
if (!Active())