aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-24 14:24:04 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-24 14:24:04 +0000
commitc837bb32bf400c958e443d20197c4f1e2fc960f9 (patch)
tree8f01094a9a89c1305efe1f24fb3fdc5dd54fd2a3
parentfe4819c2c3bf9e67e8088aea8d85751cd5918ee5 (diff)
downloadenigma2-c837bb32bf400c958e443d20197c4f1e2fc960f9.tar.gz
enigma2-c837bb32bf400c958e443d20197c4f1e2fc960f9.zip
fix CI chaining
-rw-r--r--lib/dvb_ci/dvbci.cpp30
1 files changed, 16 insertions, 14 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp
index 79f1c0d6..0c18e4f6 100644
--- a/lib/dvb_ci/dvbci.cpp
+++ b/lib/dvb_ci/dvbci.cpp
@@ -45,6 +45,9 @@ eDVBCIInterfaces::eDVBCIInterfaces()
++num_ci;
}
+ for (eSmartPtrList<eDVBCISlot>::iterator it(m_slots.begin()); it != m_slots.end(); ++it)
+ it->setSource(TUNER_A);
+
if (num_ci > 1) // // FIXME .. we force DM8000 when more than one CI Slot is avail
{
setInputSource(0, TUNER_A);
@@ -202,21 +205,21 @@ void eDVBCIInterfaces::ciRemoved(eDVBCISlot *slot)
{
if (slot->linked_next)
slot->linked_next->setSource(slot->current_source);
- else
+ else // last CI in chain
setInputSource(slot->current_tuner, slot->current_source);
if (it->cislot == slot) // remove the base slot
it->cislot = slot->linked_next;
else
{
+ eDVBCISlot *tmp = it->cislot;
+ while(tmp->linked_next != slot)
+ tmp = tmp->linked_next;
+ ASSERT(tmp);
if (slot->linked_next)
- {
- eDVBCISlot *tmp = it->cislot;
- while(tmp->linked_next != slot)
- tmp = tmp->linked_next;
- ASSERT(tmp);
tmp->linked_next = slot->linked_next;
- }
+ else
+ tmp->linked_next = 0;
}
slot->linked_next=0;
}
@@ -508,14 +511,14 @@ void eDVBCIInterfaces::removePMTHandler(eDVBServicePMTHandler *pmthandler)
it->cislot = slot->linked_next;
else
{
+ eDVBCISlot *tmp = it->cislot;
+ while(tmp->linked_next != slot)
+ tmp = tmp->linked_next;
+ ASSERT(tmp);
if (slot->linked_next)
- {
- eDVBCISlot *tmp = it->cislot;
- while(tmp->linked_next != slot)
- tmp = tmp->linked_next;
- ASSERT(tmp);
tmp->linked_next = slot->linked_next;
- }
+ else
+ tmp->linked_next = 0;
}
slot->linked_next=0;
}
@@ -901,7 +904,6 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr)
{
perror(filename);
}
- setSource(TUNER_A);
}
eDVBCISlot::~eDVBCISlot()