X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fepgcache.cpp;h=4d32474663941ec9c78322205f551a4ac8da2f36;hp=15248a6bf4da72783bd03bce213a0dfdd48275ae;hb=c72fb90523ab709569016548763d872ae53327e3;hpb=14aab9b5a3cced3ce195266d430408afdd3161a4 diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index 15248a6..4d32474 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -234,15 +234,14 @@ eEPGCache::eEPGCache() void eEPGCache::setCacheFile(const char *path) { - if (!strlen(m_filename)) + bool inited = !!strlen(m_filename); + strncpy(m_filename, path, 1024); + if (!inited) { - strncpy(m_filename, path, 1024); eDebug("[EPGC] setCacheFile read/write epg data from/to '%s'", m_filename); if (eDVBLocalTimeHandler::getInstance()->ready()) timeUpdated(); } - else - eDebug("[EPGC] setCacheFile already called... ignore '%s'", path); } void eEPGCache::timeUpdated() @@ -259,7 +258,7 @@ void eEPGCache::timeUpdated() { if (it->second->state == -1) { it->second->state=0; - messages.send(Message(Message::startChannel, it->second)); + messages.send(Message(Message::startChannel, it->first)); } } } else @@ -367,6 +366,8 @@ void eEPGCache::DVBChannelRunning(iDVBChannel *chan) messages.send(Message(Message::startChannel, chan)); // -> gotMessage -> changedService } + else + data.state=-1; } } } @@ -1188,7 +1189,7 @@ void eEPGCache::save() eEPGCache::channel_data::channel_data(eEPGCache *ml) :cache(ml) - ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(-1) + ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(-2) ,isRunning(0), haveData(0) #ifdef ENABLE_PRIVATE_EPG ,startPrivateTimer(eTimer::create(ml))