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;
}
{
eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
- int cnt=0;
- for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it, ++cnt)
+ for (eSmartPtrList<eDVBRegisteredFrontend>::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)
eDVBRegisteredFrontend *p1=NULL, *p2=NULL;
- int cnt=0;
- for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it, ++cnt)
+ for (eSmartPtrList<eDVBRegisteredFrontend>::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)