X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/61402686fd1130b5b183fbe853927180be1ba1e1..2b8587722d707e88dbc8d381a74c12c380c6db04:/lib/dvb_ci/dvbci.cpp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index cb533342..315d2ae5 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -30,7 +30,7 @@ eDVBCIInterfaces::eDVBCIInterfaces() ++num_ci; } - eDebug("done, found %d common interfaces"); + eDebug("done, found %d common interface slots", num_ci); } eDVBCIInterfaces::~eDVBCIInterfaces() @@ -40,25 +40,24 @@ eDVBCIInterfaces::~eDVBCIInterfaces() int eDVBCISlot::send(const unsigned char *data, size_t len) { int res; - int i; - - printf("< "); - for(i=0;isetRequested(eSocketNotifier::Read|eSocketNotifier::Hungup|eSocketNotifier::Write); + notifier->setRequested(eSocketNotifier::Read | eSocketNotifier::Priority | eSocketNotifier::Write); return res; } void eDVBCISlot::data(int what) { - if(what == eSocketNotifier::Hungup) { + if(what == eSocketNotifier::Priority) { if(state != stateRemoved) { state = stateRemoved; printf("ci removed\n"); @@ -71,37 +70,29 @@ void eDVBCISlot::data(int what) __u8 data[4096]; int r; r = ::read(fd, data, 4096); - //if(r < 0) - // eWarning("ERROR reading from CI - %m\n"); if(state != stateInserted) { state = stateInserted; eDebug("ci inserted"); - - /* enable HUP to detect removal or errors */ - //notifier_event->start(); - notifier->setRequested(eSocketNotifier::Read|eSocketNotifier::Hungup|eSocketNotifier::Write); + /* enable PRI to detect removal or errors */ + notifier->setRequested(eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Write); } if(r > 0) { - int i; - printf("> "); - for(i=0;i "); + //for(i=0;isetRequested(eSocketNotifier::Read|eSocketNotifier::Hungup|eSocketNotifier::Write); + notifier->setRequested(eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Write); return; } if(what == eSocketNotifier::Write) { - printf("pollall\n"); if(eDVBCISession::pollAll() == 0) { - printf("disable pollout\n"); - notifier->setRequested(eSocketNotifier::Read | eSocketNotifier::Hungup); + notifier->setRequested(eSocketNotifier::Read | eSocketNotifier::Priority); } - return; } } @@ -119,7 +110,7 @@ eDVBCISlot::eDVBCISlot(eMainloop *context, int nr) if (fd >= 0) { - notifier = new eSocketNotifier(context, fd, eSocketNotifier::Read | eSocketNotifier::Hungup); + notifier = new eSocketNotifier(context, fd, eSocketNotifier::Read | eSocketNotifier::Priority); CONNECT(notifier->activated, eDVBCISlot::data); } else {