aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-22 15:21:41 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-22 15:21:41 +0000
commitd43e4676bd757d1de73b8dd669154ffd42192b10 (patch)
treebc2fc75985ed28aefeaef89733b785f2838b9f91
parent778e07c733576c6ca23e75bfd05932159ec4dd29 (diff)
downloadenigma2-d43e4676bd757d1de73b8dd669154ffd42192b10.tar.gz
enigma2-d43e4676bd757d1de73b8dd669154ffd42192b10.zip
fix bluescreen in ci menu when no entries in a menulist an ok is pressed
reset CI when opening CI Menu and ci is not initialized yet
-rw-r--r--lib/dvb_ci/dvbci.cpp10
-rw-r--r--lib/dvb_ci/dvbci.h1
-rw-r--r--lib/dvb_ci/dvbci_ui.cpp4
-rw-r--r--lib/python/Screens/Ci.py6
4 files changed, 20 insertions, 1 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp
index 6f532bed..b182a360 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;
diff --git a/lib/dvb_ci/dvbci.h b/lib/dvb_ci/dvbci.h
index 2ef70b0e..7605a6d9 100644
--- a/lib/dvb_ci/dvbci.h
+++ b/lib/dvb_ci/dvbci.h
@@ -114,6 +114,7 @@ public:
void recheckPMTHandlers();
void gotPMT(eDVBServicePMTHandler *pmthandler);
void ciRemoved(eDVBCISlot *slot);
+ int getSlotState(int slot);
static eDVBCIInterfaces *getInstance();
diff --git a/lib/dvb_ci/dvbci_ui.cpp b/lib/dvb_ci/dvbci_ui.cpp
index ddb42fdb..23911453 100644
--- a/lib/dvb_ci/dvbci_ui.cpp
+++ b/lib/dvb_ci/dvbci_ui.cpp
@@ -43,7 +43,11 @@ eDVBCI_UI *eDVBCI_UI::getInstance()
int eDVBCI_UI::getState(int slot)
{
if (slot < MAX_SLOTS)
+ {
+ if (eDVBCIInterfaces::getInstance()->getSlotState(slot) == eDVBCISlot::stateInvalid)
+ eDVBCIInterfaces::getInstance()->reset(slot);
return slotdata[slot].state;
+ }
return 0;
}
diff --git a/lib/python/Screens/Ci.py b/lib/python/Screens/Ci.py
index a32ce344..ecc56044 100644
--- a/lib/python/Screens/Ci.py
+++ b/lib/python/Screens/Ci.py
@@ -89,7 +89,11 @@ class CiMmi(Screen):
print "do nothing - wait"
elif self.tag == "MENU":
print "answer MENU"
- eDVBCI_UI.getInstance().answerMenu(self.slotid, self["entries"].getCurrent()[1])
+ cur = self["entries"].getCurrent()
+ if cur:
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, cur[1])
+ else:
+ eDVBCI_UI.getInstance().answerMenu(self.slotid, 0)
self.showWait()
elif self.tag == "LIST":
print "answer LIST"