diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-18 09:18:43 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-18 09:18:43 +0200 |
commit | 43c828f8ca87946a83324b1285c10cc8fa11c97b (patch) | |
tree | 496c693a3c7b7f3c768c866a3961a41c0cd9a48d /device.c | |
parent | b01a1ee81864033c4489233b037b73476584fec8 (diff) | |
download | vdr-43c828f8ca87946a83324b1285c10cc8fa11c97b.tar.gz vdr-43c828f8ca87946a83324b1285c10cc8fa11c97b.tar.bz2 |
Fixed a race between SVDRP CHAN and cDevice::HasProgramme()
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 4.20 2017/05/18 09:05:46 kls Exp $ + * $Id: device.c 4.21 2017/05/18 09:16:41 kls Exp $ */ #include "device.h" @@ -834,6 +834,7 @@ bool cDevice::SwitchChannel(int Direction) eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView) { + cMutexLock MutexLock(&mutexReceiver); // to avoid a race between SVDRP CHAN and HasProgramme() cStatus::MsgChannelSwitch(this, 0, LiveView); if (LiveView) { @@ -946,6 +947,7 @@ bool cDevice::HasLock(int TimeoutMs) const bool cDevice::HasProgramme(void) const { + cMutexLock MutexLock(&mutexReceiver); // to avoid a race between SVDRP CHAN and HasProgramme() return Replaying() || pidHandles[ptAudio].pid || pidHandles[ptVideo].pid; } |