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/dvb_ci | |
| 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/dvb_ci')
| -rw-r--r-- | lib/dvb_ci/dvbci.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
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) |
