diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2009-03-11 08:06:28 +0100 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2009-03-11 08:06:28 +0100 |
| commit | 1eae3427009157fd382ca360f8d89593225272c8 (patch) | |
| tree | 7ddcc5c14ed140618651f934cc2092d992d2f598 /lib | |
| parent | c5e9c66d00e481493bbc3f63f98e57ac68962ce0 (diff) | |
| parent | 4fc2a70eeb86fa51b783b4a9c034b926db0013a3 (diff) | |
| download | enigma2-1eae3427009157fd382ca360f8d89593225272c8.tar.gz enigma2-1eae3427009157fd382ca360f8d89593225272c8.zip | |
Merge branch 'master' of /home/tmbinc/enigma2-git
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dvb/dvbtime.cpp | 7 | ||||
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 20 | ||||
| -rw-r--r-- | lib/python/Components/TimerList.py | 2 | ||||
| -rw-r--r-- | lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 5 | ||||
| -rw-r--r-- | lib/python/Tools/DreamboxHardware.py | 10 |
5 files changed, 34 insertions, 10 deletions
diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp index 03847ecb..a6830dc0 100644 --- a/lib/dvb/dvbtime.cpp +++ b/lib/dvb/dvbtime.cpp @@ -20,7 +20,7 @@ void setRTC(time_t time) FILE *f = fopen("/proc/stb/fp/rtc", "w"); if (f) { - if (fprintf(f, "%u", time)) + if (fprintf(f, "%u", (unsigned int)time)) prev_time = time; else eDebug("write /proc/stb/fp/rtc failed (%m)"); @@ -47,8 +47,11 @@ time_t getRTC() if (f) { // sanity check to detect corrupt atmel firmware - if (fscanf(f, "%u", &rtc_time) != 1) + unsigned int tmp; + if (fscanf(f, "%u", &tmp) != 1) eDebug("read /proc/stb/fp/rtc failed (%m)"); + else + rtc_time=tmp; fclose(f); } else diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index a68edea8..83bbed75 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -921,13 +921,21 @@ PyObject *eDVBCIInterfaces::readCICaIds(int slotid) char tmp[255]; snprintf(tmp, 255, "eDVBCIInterfaces::readCICaIds try to get CAIds for CI Slot %d... but just %d slots are available", slotid, m_slots.size()); PyErr_SetString(PyExc_StandardError, tmp); - return 0; } - int idx=0; - ePyObject list = PyList_New(slot->possible_caids.size()); - for (caidSet::iterator it = slot->possible_caids.begin(); it != slot->possible_caids.end(); ++it) - PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it)); - return list; + else + { + int idx=0; + eDVBCICAManagerSession *ca_manager = slot->getCAManager(); + const std::vector<uint16_t> *ci_caids = ca_manager ? &ca_manager->getCAIDs() : 0; + ePyObject list = PyList_New(ci_caids ? ci_caids->size() : 0); + if (ci_caids) + { + for (std::vector<uint16_t>::const_iterator it = ci_caids->begin(); it != ci_caids->end(); ++it) + PyList_SET_ITEM(list, idx++, PyLong_FromLong(*it)); + } + return list; + } + return 0; } int eDVBCISlot::send(const unsigned char *data, size_t len) diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py index 1109860a..44a7eb4f 100644 --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -93,7 +93,7 @@ class TimerList(HTMLComponent, GUIComponent, object): def getCurrentIndex(self): return self.instance.getCurrentIndex() - currentIndex = property(moveToIndex, getCurrentIndex) + currentIndex = property(getCurrentIndex, moveToIndex) currentSelection = property(getCurrent) def moveDown(self): diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index c2590af5..e35f2807 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -103,7 +103,10 @@ eServiceDVD::eServiceDVD(const char *filename): // create handle ddvd_set_dvd_path(m_ddvdconfig, filename); ddvd_set_ac3thru(m_ddvdconfig, 0); - ddvd_set_language(m_ddvdconfig, "de"); + + std::string ddvd_language; + if (!ePythonConfigQuery::getConfigValue("config.osd.language", ddvd_language)) + ddvd_set_language(m_ddvdconfig, (ddvd_language.substr(0,2)).c_str()); int fd = open("/proc/stb/video/aspect", O_RDONLY); if (fd > -1) diff --git a/lib/python/Tools/DreamboxHardware.py b/lib/python/Tools/DreamboxHardware.py index 5461f7b0..9e81bb47 100644 --- a/lib/python/Tools/DreamboxHardware.py +++ b/lib/python/Tools/DreamboxHardware.py @@ -23,6 +23,16 @@ def setFPWakeuptime(wutime): except IOError: print "setFPWakeupTime failed!" +def setRTCtime(wutime): + try: + open("/proc/stb/fp/rtc", "w").write(str(wutime)) + except IOError: + try: + fp = open("/dev/dbox/fp0") + ioctl(fp.fileno(), 0x101, pack('L', wutime)) # set wake up + except IOError: + print "setRTCtime failed!" + def getFPWakeuptime(): ret = 0 try: |
