+ if (direct_connected) // frontend with direct connection?
+ {
+ long ocsw = -1,
+ oucsw = -1,
+ oToneburst = -1;
+ eSecDebugNoSimulate("direct");
+ fe->getData(eDVBFrontend::ROTOR_POS, curRotorPos);
+ fe->getData(eDVBFrontend::LINKED_NEXT_PTR, linked_next_ptr);
+ fe->getData(eDVBFrontend::CSW, ocsw);
+ fe->getData(eDVBFrontend::UCSW, oucsw);
+ fe->getData(eDVBFrontend::TONEBURST, oToneburst);
+ while (ret && linked_prev_ptr != -1) // check for linked tuners..
+ {
+ eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_prev_ptr;
+ if (linked_fe->m_inuse)
+ {
+ if ( (csw != ocsw) ||
+ ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
+ ( rotor && curRotorPos != sat.orbital_position ) )
+ {
+ ret=0;
+ }
+ }
+ linked_fe->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, (long&)linked_prev_ptr);
+ }
+ eSecDebugNoSimulate("ret2 %d", ret);
+ while (ret && linked_next_ptr != -1) // check for linked tuners..
+ {
+ eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_next_ptr;
+ if (linked_fe->m_inuse)
+ {
+ if ( (csw != ocsw) ||
+ ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
+ ( rotor && curRotorPos != sat.orbital_position ) )
+ {
+ ret=0;
+ }
+ }
+ linked_fe->m_frontend->getData(eDVBFrontend::LINKED_NEXT_PTR, (long&)linked_next_ptr);
+ }
+ eSecDebugNoSimulate("ret3 %d", ret);
+ }
+ else // linked frontend..
+ {
+ long ocsw = -1,
+ oucsw = -1,
+ oToneburst = -1;
+ while (linked_prev_ptr != -1)
+ {
+ eDVBRegisteredFrontend *linked_fe = (eDVBRegisteredFrontend*) linked_prev_ptr;
+ linked_fe->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, (long&)linked_prev_ptr);
+ if (linked_prev_ptr == -1)
+ {
+ iDVBFrontend *sec_fe = linked_fe->m_frontend;
+ sec_fe->getData(eDVBFrontend::ROTOR_POS, curRotorPos);
+ if (linked_fe->m_inuse)
+ {
+ sec_fe->getData(eDVBFrontend::CSW, ocsw);
+ sec_fe->getData(eDVBFrontend::UCSW, oucsw);
+ sec_fe->getData(eDVBFrontend::TONEBURST, oToneburst);
+ eSecDebug("(%ld != %ld) || \n(%d && (%ld != %ld || %ld != %ld) ) ||\n( %d && %ld != %d ) )",
+ csw, ocsw, diseqc, ucsw, oucsw, toneburst, oToneburst, rotor, curRotorPos, sat.orbital_position);
+ if ( (csw != ocsw) ||
+ ( diseqc && (ucsw != oucsw || toneburst != oToneburst) ) ||
+ ( rotor && curRotorPos != sat.orbital_position ) )
+ {
+ ret=0;
+ }
+ }
+ }
+ }
+ eSecDebugNoSimulate("ret4 %d", ret);
+ }