From: Andreas Monzner Date: Tue, 9 May 2006 21:45:59 +0000 (+0000) Subject: fix graying out of non selectable services in servicelist X-Git-Tag: 2.6.0~3464 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/1c4afca574ce3b3af434b458e52b61871eba5d31 fix graying out of non selectable services in servicelist --- diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 2a188ee1..09c9f5f6 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -536,7 +536,11 @@ bool eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, con if (i->m_channel_id == ignore) { eDVBChannel *channel = (eDVBChannel*) &(*i->m_channel); - if (channel == &(*m_cached_channel) ? channel->getUseCount() == 2 : channel->getUseCount() == 1) // channel only used once.. + // one eUsePtr is used in eDVBServicePMTHandler + // another on eUsePtr is used in the eDVBScan instance used in eDVBServicePMTHandler (for SDT scan) + // so we must check here if usecount is 3 (when the channel is equal to the cached channel) + // or 2 when the cached channel is not equal to the compared channel + if (channel == &(*m_cached_channel) ? channel->getUseCount() == 3 : channel->getUseCount() == 2) // channel only used once.. { ePtr fe; if (!i->m_channel->getFrontend(fe))