X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/682b9158bbddde229a2559365aa108812b15de61..c4bab36eed7b9ce0ba0b16775a9d429c71c5eed7:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index d76cd341..67b2eafa 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -44,20 +44,22 @@ void eDVBCISlot::data(int) if(r < 0) eWarning("ERROR reading from CI - %m\n"); - if(!se) { + if(state != stateInserted) { + state = stateInserted; eDebug("ci inserted"); - se = new eDVBCISession(this); - + /* enable HUP to detect removal or errors */ notifier_event->start(); } if(r > 0) - se->receiveData(data, r); + eDVBCISession::receiveData(this, data, r); } void eDVBCISlot::event(int) { + state = stateRemoved; + eDebug("CI removed"); /* kill the TransportConnection */ @@ -66,7 +68,7 @@ void eDVBCISlot::event(int) notifier_event->stop(); } -eDVBCISlot::eDVBCISlot(eMainloop *context, int nr): se(0) +eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) { char filename[128];