summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-10-09 13:13:36 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-10-09 13:13:36 +0200
commit53e840af509e64349621aebed981570c24ed0c88 (patch)
treeb7451de8e36ed3aa388e23604980948bc81750da /recording.c
parentbf779b3bfe1c5742fce085b1885f96a45b51e82e (diff)
downloadvdr-53e840af509e64349621aebed981570c24ed0c88.tar.gz
vdr-53e840af509e64349621aebed981570c24ed0c88.tar.bz2
Added more error messages and line numbers when reading EPG data and info.vdr
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/recording.c b/recording.c
index 9e969224..6fb76d97 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.120 2005/10/01 10:29:02 kls Exp $
+ * $Id: recording.c 1.121 2005/10/09 13:09:51 kls Exp $
*/
#include "recording.h"
@@ -264,7 +264,9 @@ bool cRecordingInfo::Read(FILE *f)
if (ownEvent) {
cReadLine ReadLine;
char *s;
+ int line = 0;
while ((s = ReadLine.Read(f)) != NULL) {
+ ++line;
char *t = skipspace(s + 1);
switch (*s) {
case 'C': {
@@ -275,8 +277,10 @@ bool cRecordingInfo::Read(FILE *f)
channelID = tChannelID::FromString(t);
}
break;
- default: if (!ownEvent->Parse(s))
+ default: if (!ownEvent->Parse(s)) {
+ esyslog("ERROR: EPG data problem in line %d", line);
return false;
+ }
break;
}
}
@@ -478,7 +482,8 @@ cRecording::cRecording(const char *FileName)
asprintf(&InfoFileName, "%s%s", fileName, INFOFILESUFFIX);
FILE *f = fopen(InfoFileName, "r");
if (f) {
- info->Read(f);
+ if (!info->Read(f))
+ esyslog("ERROR: EPG data problem in file %s", InfoFileName);
fclose(f);
}
else if (errno != ENOENT)