summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-01-14 12:21:17 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-01-14 12:21:17 +0100
commite7c86c676017a75f4c3d522a341ed95057be6820 (patch)
treeb000472c7281fc31d0152cc7f648d8a3684bc133 /device.c
parentdbf342df3c401cfc4cd4d5df28c98c175ba252bc (diff)
downloadvdr-e7c86c676017a75f4c3d522a341ed95057be6820.tar.gz
vdr-e7c86c676017a75f4c3d522a341ed95057be6820.tar.bz2
Improved locking for CAM slots and made the pure functions of cCiAdapter have default implementations
Diffstat (limited to 'device.c')
-rw-r--r--device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/device.c b/device.c
index 84caf4e1..b84b5a26 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.7 2014/01/02 10:31:58 kls Exp $
+ * $Id: device.c 3.8 2014/01/14 11:58:49 kls Exp $
*/
#include "device.h"
@@ -358,6 +358,7 @@ bool cDevice::HasCi(void)
void cDevice::SetCamSlot(cCamSlot *CamSlot)
{
+ LOCK_THREAD;
camSlot = CamSlot;
}
@@ -1575,6 +1576,7 @@ 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);
@@ -1599,7 +1601,6 @@ 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) {
@@ -1612,7 +1613,6 @@ void cDevice::Action(void)
ChannelCamRelations.SetDecrypt(receiver[i]->ChannelID(), CamSlotNumber);
}
}
- Unlock();
}
}
else