summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-07-28 11:29:32 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-07-28 11:29:32 +0200
commita4246cfd9aa7f3c5a02145815a1e26dcace09327 (patch)
tree98386d9bbd934e14a44e162d8dfacf40a9c388a3 /device.c
parente77d5dfbfba9d05ed647ca19f7295428e7e2202c (diff)
downloadvdr-a4246cfd9aa7f3c5a02145815a1e26dcace09327.tar.gz
vdr-a4246cfd9aa7f3c5a02145815a1e26dcace09327.tar.bz2
Fixed PID handling for cReceiver
Diffstat (limited to 'device.c')
-rw-r--r--device.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/device.c b/device.c
index c85cd450..9e707515 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 1.5 2002/06/23 12:51:24 kls Exp $
+ * $Id: device.c 1.6 2002/07/28 11:03:53 kls Exp $
*/
#include "device.h"
@@ -882,7 +882,7 @@ int cDevice::ProvidesCa(int Ca)
bool cDevice::Receiving(void)
{
for (int i = 0; i < MAXRECEIVERS; i++) {
- if (receiver[i])
+ if (receiver[i] && receiver[i]->priority > 0) // cReceiver with priority < 0 doesn't count
return true;
}
return false;
@@ -964,12 +964,8 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
for (int i = 0; i < MAXRECEIVERS; i++) {
if (!receiver[i]) {
//siProcessor->SetStatus(false);//XXX+
- for (int n = 0; n < MAXRECEIVEPIDS; n++) {
- if (Receiver->pids[n])
- AddPid(Receiver->pids[n]);//XXX+ retval!
- else
- break;
- }
+ for (int n = 0; n < MAXRECEIVEPIDS; n++)
+ AddPid(Receiver->pids[n]);//XXX+ retval!
Receiver->Activate(true);
Lock();
Receiver->device = this;
@@ -995,12 +991,8 @@ void cDevice::Detach(cReceiver *Receiver)
receiver[i] = NULL;
Receiver->device = NULL;
Unlock();
- for (int n = 0; n < MAXRECEIVEPIDS; n++) {
- if (Receiver->pids[n])
- DelPid(Receiver->pids[n]);
- else
- break;
- }
+ for (int n = 0; n < MAXRECEIVEPIDS; n++)
+ DelPid(Receiver->pids[n]);
}
else if (receiver[i])
receiversLeft = true;