X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/b2eebd0fef155a40a8a74468c4488cfb0c656a9a..5563110c9b66d46f0c47d599ed06dd65525cfecd:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 79f1c0d6..75250404 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -45,6 +45,9 @@ eDVBCIInterfaces::eDVBCIInterfaces() ++num_ci; } + for (eSmartPtrList::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,23 +511,23 @@ 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; } // eDebug("use_count is now %d", slot->use_count); slot = next; } + // check if another service is waiting for the CI + recheckPMTHandlers(); } - // check if another service is waiting for the CI - recheckPMTHandlers(); } void eDVBCIInterfaces::gotPMT(eDVBServicePMTHandler *pmthandler) @@ -895,13 +898,12 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) if (fd >= 0) { - notifier = new eSocketNotifier(context, fd, eSocketNotifier::Read | eSocketNotifier::Priority | eSocketNotifier::Write); + notifier = eSocketNotifier::create(context, fd, eSocketNotifier::Read | eSocketNotifier::Priority | eSocketNotifier::Write); CONNECT(notifier->activated, eDVBCISlot::data); } else { perror(filename); } - setSource(TUNER_A); } eDVBCISlot::~eDVBCISlot()