Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: broken epg.data file ?
Thilo Wunderlich wrote:
>
> I tried to program my vdr via vdradmind when I noticed that I couldn't
> reach the port 2001. I tried vanilla vdr 1.0.0pre4 and 1.0.0pre4 AIO vdr
> but without success. After deleting the epg.data file the SVDRP port
> was reachable again.
> As I was not at home at that time, I don't know if vdr was working
> correctly at all (just port 2001 disabled).
>
> If someone would have a look at the epg.data file:
>
> http://www.speedway.org/thilo/epg.data.gz
This file is not complete. It is missing the closing 'e' and 'c'
tags, and especially the '\n' in the last line. This causes the
"while (<>)" loops to wait indefinitely until the line is actually
closed.
I assume that vdradmind has read the epg.data file at a time where
that file was not yet completely written and thus missed the end of the
file.
I'll change the code that writes this file so that it makes sure that
the file is only accessible after it has been written entirely:
--- eit.c 2002/04/01 12:58:20
+++ eit.c 2002/04/06 11:42:47
@@ -1090,10 +1090,10 @@
if (epgDataFileName && now - lastDump > 600)
{
cMutexLock MutexLock(&schedulesMutex);
- FILE *f = fopen(GetEpgDataFileName(), "w");
- if (f) {
+ cSafeFile f(GetEpgDataFileName());
+ if (f.Open()) {
schedules->Dump(f);
- fclose(f);
+ f.Close();
}
else
LOG_ERROR;
Klaus
--
_______________________________________________________________
Klaus Schmidinger Phone: +49-8635-6989-10
CadSoft Computer GmbH Fax: +49-8635-6989-40
Hofmark 2 Email: kls@cadsoft.de
D-84568 Pleiskirchen, Germany URL: www.cadsoft.de
_______________________________________________________________
Home |
Main Index |
Thread Index