X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a910d779836f8368bd7986dae6d25615ca6ca9e9..7abf1d06a7a051f55708af14aef49ad7fea093ac:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index e6e3237d..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) @@ -30,7 +32,7 @@ eDVBCIInterfaces::eDVBCIInterfaces() ++num_ci; } - eDebug("done, found %d common interface slots"); + eDebug("done, found %d common interface slots", num_ci); } eDVBCIInterfaces::~eDVBCIInterfaces() @@ -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) {