summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-01-21 11:12:01 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-01-21 11:12:01 +0100
commit838566ea418c42a7be96417657a5bee70dae2c22 (patch)
tree79eaa5c2e4d4ad69defcbf5623315bda665249b8 /device.c
parent6e2f0f695f0c537ddeb0c61b51e298caf29bcbb3 (diff)
downloadvdr-838566ea418c42a7be96417657a5bee70dae2c22.tar.gz
vdr-838566ea418c42a7be96417657a5bee70dae2c22.tar.bz2
Fixed a deadlock
Diffstat (limited to 'device.c')
-rw-r--r--device.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/device.c b/device.c
index 5b9e1ec6..9da5e7ff 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 3.10 2014/01/20 11:53:47 kls Exp $
+ * $Id: device.c 3.11 2014/01/21 11:12:01 kls Exp $
*/
#include "device.h"
@@ -1579,7 +1579,6 @@ void cDevice::Action(void)
while (Running()) {
// Read data from the DVR device:
uchar *b = NULL;
- LOCK_THREAD;
if (GetTSPacket(b)) {
if (b) {
int Pid = TsPid(b);
@@ -1604,6 +1603,7 @@ void cDevice::Action(void)
}
}
// Distribute the packet to all attached receivers:
+ Lock();
for (int i = 0; i < MAXRECEIVERS; i++) {
if (receiver[i] && receiver[i]->WantsPid(Pid)) {
if (DetachReceivers) {
@@ -1616,6 +1616,7 @@ void cDevice::Action(void)
ChannelCamRelations.SetDecrypt(receiver[i]->ChannelID(), CamSlotNumber);
}
}
+ Unlock();
}
}
else