From 837d2002999d5ff89bc60e9e5c35d16e7efe084c Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 17 Jul 2008 14:57:23 +0000 Subject: [PATCH] fix linking tuners --- lib/dvb/sec.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/dvb/sec.cpp b/lib/dvb/sec.cpp index 10b362ab..5c0601ad 100644 --- a/lib/dvb/sec.cpp +++ b/lib/dvb/sec.cpp @@ -849,7 +849,7 @@ RESULT eDVBSatelliteEquipmentControl::addLNB() eDebug("no more LNB free... cnt is %d", m_lnbidx); return -ENOSPC; } - eSecDebug("eDVBSatelliteEquipmentControl::addLNB(%d)", m_lnbidx-1); + eSecDebug("eDVBSatelliteEquipmentControl::addLNB(%d)", m_lnbidx); return 0; } @@ -1260,12 +1260,11 @@ RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2) { eDVBRegisteredFrontend *p1=NULL, *p2=NULL; - int cnt=0; - for (eSmartPtrList::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it, ++cnt) + for (eSmartPtrList::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it) { - if (cnt == tu1) + if (it->m_frontend->getSlotID() == tu1) p1 = *it; - else if (cnt == tu2) + else if (it->m_frontend->getSlotID() == tu2) p2 = *it; } if (p1 && p2) @@ -1297,12 +1296,11 @@ RESULT eDVBSatelliteEquipmentControl::setTunerDepends(int tu1, int tu2) eDVBRegisteredFrontend *p1=NULL, *p2=NULL; - int cnt=0; - for (eSmartPtrList::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it, ++cnt) + for (eSmartPtrList::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it) { - if (cnt == tu1) + if (it->m_frontend->getSlotID() == tu1) p1 = *it; - else if (cnt == tu2) + else if (it->m_frontend->getSlotID() == tu2) p2 = *it; } if (p1 && p2) -- 2.30.2