1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed a race condition when zapping in transfer mode (cont'd)

This commit is contained in:
Klaus Schmidinger 2012-08-31 11:02:24 +02:00
parent 5d0410de3e
commit d3b3c43e8f

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 2.65 2012/08/26 13:45:38 kls Exp $ * $Id: device.c 2.66 2012/08/31 11:02:24 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -1675,8 +1675,8 @@ void cDevice::Detach(cReceiver *Receiver)
cMutexLock MutexLock(&mutexReceiver); cMutexLock MutexLock(&mutexReceiver);
for (int i = 0; i < MAXRECEIVERS; i++) { for (int i = 0; i < MAXRECEIVERS; i++) {
if (receiver[i] == Receiver) { if (receiver[i] == Receiver) {
Receiver->Activate(false);
Lock(); Lock();
Receiver->Activate(false);
receiver[i] = NULL; receiver[i] = NULL;
Receiver->device = NULL; Receiver->device = NULL;
Unlock(); Unlock();