if(channelid==cache_chan->getChannelID())
{
eDebug("use cached_channel");
- channel=m_cached_channel;
+ channel = m_cached_channel;
return 0;
}
m_cached_channel=0;
ourstate = state_tuning;
} else if (state == iDVBFrontend::stateLostLock)
{
- eDebug("OURSTATE: lost lock.. retune");
- ourstate = state_tuning;
- m_frontend->get().tune(*m_feparm);
+ /* on managed channels, we try to retune in order to re-acquire lock. */
+ if (m_feparm)
+ {
+ eDebug("OURSTATE: lost lock, trying to retune");
+ ourstate = state_tuning;
+ m_frontend->get().tune(*m_feparm);
+ } else
+ /* on unmanaged channels, we don't do this. the client will do this. */
+ {
+ eDebug("OURSTATE: lost lock, unavailable now.");
+ ourstate = state_unavailable;
+ }
} else if (state == iDVBFrontend::stateFailed)
{
eDebug("OURSTATE: failed");