X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb_ci%2Fdvbci.cpp;h=63df265043e85902f2f72829d7ed5f8ee3060068;hp=6f532bedb54cc6f94f9e8072b2f22a22a885cc75;hb=a14453e375c72eae797ef3c93971c08eb05f8529;hpb=98652711568f9545526722e0090c05ae91b87e15 diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 6f532be..63df265 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -66,6 +66,16 @@ eDVBCISlot *eDVBCIInterfaces::getSlot(int slotid) return 0; } +int eDVBCIInterfaces::getSlotState(int slotid) +{ + eDVBCISlot *slot; + + if( (slot = getSlot(slotid)) == 0 ) + return eDVBCISlot::stateInvalid; + + return slot->getState(); +} + int eDVBCIInterfaces::reset(int slotid) { eDVBCISlot *slot; @@ -423,8 +433,6 @@ int eDVBCISlot::send(const unsigned char *data, size_t len) void eDVBCISlot::data(int what) { - if (state == stateInvalid) - return; if(what == eSocketNotifier::Priority) { if(state != stateRemoved) { state = stateRemoved; @@ -442,6 +450,9 @@ void eDVBCISlot::data(int what) return; } + if (state == stateInvalid) + return; + if(state != stateInserted) { eDebug("ci inserted"); state = stateInserted;