X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/9cd2284f3e08f856860adcf6ac54943e664b27c3..477c468861635555c7179f2f4397dd765f499656:/lib/dvb/epgcache.cpp diff --git a/lib/dvb/epgcache.cpp b/lib/dvb/epgcache.cpp index 716033ee..0af14c6b 100644 --- a/lib/dvb/epgcache.cpp +++ b/lib/dvb/epgcache.cpp @@ -701,6 +701,7 @@ void eEPGCache::thread() void eEPGCache::load() { + singleLock s(cache_lock); FILE *f = fopen("/hdd/epg.dat", "r"); if (f) { @@ -725,7 +726,7 @@ void eEPGCache::load() if ( md5ok ) #endif { - int magic; + unsigned int magic=0; fread( &magic, sizeof(int), 1, f); if (magic != 0x98765432) { @@ -831,7 +832,7 @@ void eEPGCache::save() int cnt=0; if ( f ) { - int magic = 0x98765432; + unsigned int magic = 0x98765432; fwrite( &magic, sizeof(int), 1, f); const char *text = "ENIGMA_EPG_V5"; fwrite( text, 13, 1, f ); @@ -1541,7 +1542,7 @@ PyObject *eEPGCache::lookupEvent(PyObject *list, PyObject *convertFunc) if (!PyString_Check(entry)) { eDebug("tuple entry 0 is no a string"); - continue; + goto skip_entry; } service = entry; break; @@ -1551,7 +1552,7 @@ PyObject *eEPGCache::lookupEvent(PyObject *list, PyObject *convertFunc) if (type < -1 || type > 2) { eDebug("unknown type %d", type); - continue; + goto skip_entry; } break; case 2: @@ -1623,6 +1624,8 @@ PyObject *eEPGCache::lookupEvent(PyObject *list, PyObject *convertFunc) if (service_name) Py_DECREF(service_name); } +skip_entry: + ; } if (convertFuncArgs) Py_DECREF(convertFuncArgs);