fix enigma2 all systemresources (high systemload) since previous CI changes
[vuplus_dvbapp] / lib / dvb_ci / dvbci.cpp
index 6f532be..63df265 100644 (file)
@@ -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;