diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-18 14:30:58 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2014-01-18 14:30:58 +0100 |
commit | 6f9929b1c0c3a5faa5377eebbc761894b4d98613 (patch) | |
tree | 265f1818a05d9a9776f6789154f9a2b54a87c8b2 /device.c | |
parent | 35d4ceaf371e5f19a41ba700bee4d5aaf2f15b64 (diff) | |
download | vdr-6f9929b1c0c3a5faa5377eebbc761894b4d98613.tar.gz vdr-6f9929b1c0c3a5faa5377eebbc761894b4d98613.tar.bz2 |
Now unassigning CAMs from their devices when they are no longer used
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 3.8 2014/01/14 11:58:49 kls Exp $ + * $Id: device.c 3.9 2014/01/18 14:26:06 kls Exp $ */ #include "device.h" @@ -1697,8 +1697,12 @@ void cDevice::Detach(cReceiver *Receiver) else if (receiver[i]) receiversLeft = true; } - if (camSlot && Receiver->priority > MINPRIORITY) // priority check to avoid an infinite loop with the CAM slot's caPidReceiver - camSlot->StartDecrypting(); + if (camSlot) { + if (Receiver->priority > MINPRIORITY) // priority check to avoid an infinite loop with the CAM slot's caPidReceiver + camSlot->StartDecrypting(); + if (!camSlot->IsDecrypting()) + camSlot->Assign(NULL); + } if (!receiversLeft) Cancel(-1); } |