summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-20 09:53:08 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-20 09:53:08 +0200
commit6bdfa4638d8ba2997de3913e2c3686ca1e6ab02c (patch)
tree71847f51eb82d5cefb6846edf6d69036f56a71c4 /ci.c
parent5573a03fdc2efcdc2be94d44d49737b2a4194d47 (diff)
downloadvdr-6bdfa4638d8ba2997de3913e2c3686ca1e6ab02c.tar.gz
vdr-6bdfa4638d8ba2997de3913e2c3686ca1e6ab02c.tar.bz2
Enhanced detection of pending user I/O from CAMs
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ci.c b/ci.c
index 31461ea2..91d9ede9 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 1.13 2003/04/19 10:59:53 kls Exp $
+ * $Id: ci.c 1.14 2003/04/20 09:52:45 kls Exp $
*/
/* XXX TODO
@@ -625,6 +625,7 @@ public:
const cCiTransportConnection *Tc(void) { return tc; }
int SessionId(void) { return sessionId; }
int ResourceId(void) { return resourceId; }
+ virtual bool HasUserIO(void) { return false; }
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
};
@@ -1009,6 +1010,7 @@ public:
cCiMMI(int SessionId, cCiTransportConnection *Tc);
virtual ~cCiMMI();
virtual bool Process(int Length = 0, const uint8_t *Data = NULL);
+ virtual bool HasUserIO(void) { return menu || enquiry; }
cCiMenu *Menu(void);
cCiEnquiry *Enquiry(void);
bool SendMenuAnswer(uint8_t Selection);
@@ -1287,6 +1289,7 @@ cCiHandler::cCiHandler(int Fd, int NumSlots)
{
numSlots = NumSlots;
newCaSupport = false;
+ hasUserIO = false;
for (int i = 0; i < MAX_CI_SESSION; i++)
sessions[i] = NULL;
tpl = new cCiTransportLayer(Fd, numSlots);
@@ -1480,10 +1483,12 @@ bool cCiHandler::Process(void)
tpl->NewConnection(Slot);
}
}
+ bool UserIO = false;
for (int i = 0; i < MAX_CI_SESSION; i++) {
- if (sessions[i])
- sessions[i]->Process();
+ if (sessions[i] && sessions[i]->Process())
+ UserIO |= sessions[i]->HasUserIO();
}
+ hasUserIO = UserIO;
if (newCaSupport)
newCaSupport = result = false; // triggers new SetCaPmt at caller!
return result;