+
+ if (linked_to != -1) // check for linked tuners..
+ {
+ bool found=false;
+ eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin());
+ for (; it != m_avail_frontends.end(); ++it)
+ if ( !linked_to )
+ {
+ found=true;
+ break;
+ }
+ else
+ --linked_to;
+
+ if (found && it->m_inuse)
+ {
+ int ocsw = -1,
+ oucsw = -1,
+ oToneburst = -1,
+ oRotorPos = -1;
+ it->m_frontend->getData(0, ocsw);
+ it->m_frontend->getData(1, oucsw);
+ it->m_frontend->getData(2, oToneburst);
+ it->m_frontend->getData(6, oRotorPos);
+
+ eDebug("compare csw %02x == lcsw %02x",
+ csw, ocsw);
+ if ( diseqc )
+ eDebug("compare ucsw %02x == lucsw %02x\ncompare toneburst %02x == oToneburst %02x",
+ ucsw, oucsw, toneburst, oToneburst);
+ if ( rotor )
+ eDebug("compare pos %d == current pos %d",
+ sat.orbital_position, oRotorPos);
+
+ if ( (csw != ocsw) ||
+ ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
+ ( rotor && oRotorPos != sat.orbital_position ) )
+ {
+ eDebug("can not tune this transponder with linked tuner in use!!");
+ ret=0;
+ }
+ else
+ eDebug("OK .. can tune this transponder with linked tuner in use :)");
+ }
+ }