Fixed a possible race condition in cDevice::Action()

This commit is contained in:
Klaus Schmidinger 2005-01-06 16:46:18 +01:00
parent cb696731e6
commit bbe24e4e62
3 changed files with 4 additions and 2 deletions

View File

@ -1160,6 +1160,7 @@ Lucian Muresan <lucianm@users.sourceforge.net>
Mattias Grönlund <Mattias@Gronlund.net> Mattias Grönlund <Mattias@Gronlund.net>
for pointing out a missing cleanup at program exit in case there is a problem for pointing out a missing cleanup at program exit in case there is a problem
with a plugin with a plugin
for fixing possible race condition in cDevice::Action()
Uwe Hanke <uhanke@gmx.de> Uwe Hanke <uhanke@gmx.de>
for fixing some typos in the Makefile's 'font' target for fixing some typos in the Makefile's 'font' target

View File

@ -3275,3 +3275,4 @@ Video Disk Recorder Revision History
Currently there is no visual indicator of the audio channel, yet, and it Currently there is no visual indicator of the audio channel, yet, and it
doesn't work with the selected audio languages. It also doesn't appear to doesn't work with the selected audio languages. It also doesn't appear to
work with some DVB cards (esp. the Siemens DVB-S Rev 1.3). work with some DVB cards (esp. the Siemens DVB-S Rev 1.3).
- Fixed a possible race condition in cDevice::Action() (thanks to Mattias Grönlund).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: device.c 1.69 2005/01/06 14:56:08 kls Exp $ * $Id: device.c 1.70 2005/01/06 16:45:12 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -976,8 +976,8 @@ bool cDevice::Receiving(bool CheckAny) const
void cDevice::Action(void) void cDevice::Action(void)
{ {
active = true;
if (OpenDvr()) { if (OpenDvr()) {
active = true;
for (; active;) { for (; active;) {
// Read data from the DVR device: // Read data from the DVR device:
uchar *b = NULL; uchar *b = NULL;