X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d290a6895aaba9660184b2ac9c1bb90d81ae494c..d41938053190e075de41c63acfdcea3e239dcaba:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index b15fcce3..235b0ac3 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -73,6 +73,8 @@ int eDVBCIInterfaces::reset(int slotid) if( (slot = getSlot(slotid)) == 0 ) return -1; + eDVBCISession::deleteSessions(slot); + return slot->reset(); } @@ -83,7 +85,37 @@ int eDVBCIInterfaces::enableTS(int slotid, int enable) if( (slot = getSlot(slotid)) == 0 ) return -1; - return slot->enableTS(enable); + int tunernum = 0; + if (enable) + { + tunernum=-1; + PMTHandlerList::iterator it = m_pmt_handlers.begin(); + while (it != m_pmt_handlers.end()) + { + if ( it->cislot == slot ) + { + eDVBServicePMTHandler *pmthandler = it->pmthandler; + eUsePtr channel; + if (!pmthandler->getChannel(channel)) + { + ePtr frontend; + if (!channel->getFrontend(frontend)) + { + eDVBFrontend *fe = (eDVBFrontend*) &(*frontend); + tunernum = fe->getID(); + } + } + break; + } + ++it; + } + if ( tunernum == -1 ) + { + eFatal("couldn't find the correct tuner num in enableTS"); + return -1; + } + } + return slot->enableTS(enable, tunernum); } int eDVBCIInterfaces::initialize(int slotid) @@ -299,6 +331,7 @@ void eDVBCISlot::data(int what) state = stateRemoved; enableTS(0); printf("ci removed\n"); + eDVBCISession::deleteSessions(this); notifier->setRequested(eSocketNotifier::Read); //HACK eDVBCI_UI::getInstance()->setState(0,0); @@ -531,22 +564,34 @@ int eDVBCISlot::sendCAPMT(eDVBServicePMTHandler *pmthandler, const std::vector