projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4514d25
)
fix corrupted epg.dat by using a faked version string and not writing the correct...
author
Andreas Oberritter
<obi@opendreambox.org>
Tue, 30 Sep 2008 23:09:16 +0000
(23:09 +0000)
committer
Andreas Oberritter
<obi@opendreambox.org>
Tue, 30 Sep 2008 23:09:16 +0000
(23:09 +0000)
lib/dvb/epgcache.cpp
patch
|
blob
|
history
diff --git
a/lib/dvb/epgcache.cpp
b/lib/dvb/epgcache.cpp
index
2a07047
..
1a07755
100644
(file)
--- a/
lib/dvb/epgcache.cpp
+++ b/
lib/dvb/epgcache.cpp
@@
-1018,7
+1018,7
@@
void eEPGCache::save()
{
unsigned int magic = 0x98765432;
fwrite( &magic, sizeof(int), 1, f);
- const char *text = "
ENIGMA_EPG
_V7";
+ const char *text = "
UNFINISHED
_V7";
fwrite( text, 13, 1, f );
int size = eventDB.size();
fwrite( &size, sizeof(int), 1, f );
@@
-1065,6
+1065,11
@@
void eEPGCache::save()
}
}
#endif
+ // write version string after binary data
+ // has been written to disk.
+ fsync(fileno(f));
+ fseek(f, sizeof(int), SEEK_SET);
+ fwrite("ENIGMA_EPG_V7", 13, 1, f);
fclose(f);
#if 0
unsigned char md5[16];