diff options
-rw-r--r-- | device.c | 3 | ||||
-rw-r--r-- | mcli.c | 5 | ||||
-rw-r--r-- | mcli.h | 2 |
3 files changed, 9 insertions, 1 deletions
@@ -538,10 +538,11 @@ bool cMcliDevice::SetChannelDevice (const cChannel * Channel, bool LiveView) } else { m_disabletimeout = TEMP_DISABLE_TIMEOUT_DEFAULT; } - bool cam_force=true; + bool cam_force = m_mcli && m_mcli->CAMPresent() && LiveView; if(cam_force && !CheckCAM(Channel, true)) { #ifdef DEBUG_TUNE dsyslog("Mcli::%s: No CAM on DVB %d available even after tried to steal one\n", __FUNCTION__, CardIndex () + 1); + dsyslog("CAMPresent: %d\n", m_mcli->CAMPresent()); #endif return false; } @@ -122,6 +122,7 @@ cPluginMcli::cPluginMcli (void) m_recv_init_done = 0; m_mld_init_done = 0; m_api_init_done = 0; + m_cam_present = false; memset (m_cam_pool, 0, sizeof (cam_pool_t) * CAM_POOL_MAX); for(i=0; i<CAM_POOL_MAX; i++) { m_cam_pool[i].max = -1; @@ -327,9 +328,13 @@ int cPluginMcli::CAMPoolAdd(netceiver_info_t *nci) switch (nci->cam[j].flags) { case CA_SINGLE: case CA_MULTI_SID: + m_cam_present = true; + dsyslog("Found CAM"); cp->max = 1; break; case CA_MULTI_TRANSPONDER: + dsyslog("Found CAM"); + m_cam_present = true; cp->max = nci->cam[j].max_sids; break; } @@ -96,6 +96,7 @@ class cPluginMcli:public cPlugin, public cThread int m_recv_init_done; int m_mld_init_done; int m_api_init_done; + bool m_cam_present; tuner_pool_t m_tuner_pool[TUNER_POOL_MAX]; tuner_pool_t *TunerAvailableInt(fe_type_t type, int pos); @@ -158,6 +159,7 @@ class cPluginMcli:public cPlugin, public cThread cam_pool_t *CAMAlloc (const char *uuid=NULL, int slot=-1); int CAMFree (cam_pool_t *cp); bool CAMSteal(const char *uuid=NULL, int slot=-1, bool force=false); + bool CAMPresent() { return m_cam_present; } satellite_list_t *TunerFindSatList(const netceiver_info_t *nc_info, const char *SatelliteListName) const; bool SatelitePositionLookup(const satellite_list_t *satlist, int pos) const; |