eDebug("no channel list");
else
{
- m_dvb_scan->insertInto(db);
+ m_dvb_scan->insertInto(db, true);
eDebug("sdt update done!");
}
break;
ref.getChannelID(chid);
res = m_resourceManager->allocateChannel(chid, m_channel);
eDebug("allocate Channel: res %d", res);
- eDVBCIInterfaces::getInstance()->addPMTHandler(this);
+ if (!res)
+ eDVBCIInterfaces::getInstance()->addPMTHandler(this);
} else
{
eDVBMetaParser parser;
ePtr<eTable<ProgramMapSection> > ptr;
m_PMT.getCurrent(ptr);
eDVBCAService::unregister_service(m_reference, demuxes, ptr);
- eDVBCIInterfaces::getInstance()->removePMTHandler(this);
m_ca_servicePtr = 0;
}
+ if (m_channel)
+ eDVBCIInterfaces::getInstance()->removePMTHandler(this);
+
if (m_pvr_channel)
{
m_pvr_channel->stopFile();