summaryrefslogtreecommitdiff
path: root/device.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2022-01-24 16:53:45 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2022-01-24 16:53:45 +0100
commit50c3951017411eabb5a14f43ccca91cd564f4d3a (patch)
tree5df3fe6f4ed609adb283f5e1c817e2a1ff3eafd1 /device.h
parentea1ad945b4fdedda8923b88d68d412743845a17e (diff)
downloadvdr-50c3951017411eabb5a14f43ccca91cd564f4d3a.tar.gz
vdr-50c3951017411eabb5a14f43ccca91cd564f4d3a.tar.bz2
Fixed a possible deadlock in cDevice::DetachAllReceivers()
Diffstat (limited to 'device.h')
-rw-r--r--device.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/device.h b/device.h
index 63eef603..2d0ac12f 100644
--- a/device.h
+++ b/device.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.h 5.1 2021/05/21 12:51:16 kls Exp $
+ * $Id: device.h 5.2 2022/01/24 16:53:45 kls Exp $
*/
#ifndef __DEVICE_H
@@ -465,6 +465,8 @@ public:
private:
cCamSlot *camSlot;
+ void ReleaseCamSlot(void);
+ ///< Releases the CAM slot if it is currently not used.
public:
virtual bool HasCi(void);
///< Returns true if this device has a Common Interface.
@@ -852,8 +854,11 @@ public:
///< Returns true if we are currently receiving. The parameter has no meaning (for backwards compatibility only).
bool AttachReceiver(cReceiver *Receiver);
///< Attaches the given receiver to this device.
- void Detach(cReceiver *Receiver);
+ void Detach(cReceiver *Receiver, bool ReleaseCam = true);
///< Detaches the given receiver from this device.
+ ///< If ReleaseCam is true, the CAM slot will be released if it
+ ///< is no longer used. Otherwise the caller must call ReleaseCamSlot() after
+ ///< calling this function.
void DetachAll(int Pid);
///< Detaches all receivers from this device for this pid.
virtual void DetachAllReceivers(void);