X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/059f7f9c3ef10f29ac0c4f87c380854e1185e1e2..358517314bcfc91cfc7fcecaaaf3441ea1c103ee:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 315d2ae5..014d51a5 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -7,10 +7,12 @@ #include #include +#include + eDVBCIInterfaces::eDVBCIInterfaces() { int num_ci = 0; - + eDebug("scanning for common interfaces.."); while (1) @@ -62,11 +64,12 @@ void eDVBCISlot::data(int what) state = stateRemoved; printf("ci removed\n"); notifier->setRequested(eSocketNotifier::Read); + //HACK + eDVBCI_UI::getInstance()->setState(0,0); } return; } - __u8 data[4096]; int r; r = ::read(fd, data, 4096); @@ -74,6 +77,10 @@ void eDVBCISlot::data(int what) if(state != stateInserted) { state = stateInserted; eDebug("ci inserted"); + + //HACK + eDVBCI_UI::getInstance()->setState(0,1); + /* enable PRI to detect removal or errors */ notifier->setRequested(eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Write); } @@ -107,6 +114,8 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) fd = ::open(filename, O_RDWR | O_NONBLOCK); eDebug("eDVBCISlot has fd %d", fd); + + state = stateInserted; if (fd >= 0) {