From c99e16ec41d48206c1c7e158be91a96c33c36539 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 17 Jul 2004 11:22:29 +0200 Subject: Removed all error messages from cRecordings::ScanVideoDir() --- HISTORY | 6 ++++++ config.h | 6 +++--- recording.c | 23 +++++++---------------- recording.h | 4 ++-- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/HISTORY b/HISTORY index 2228a7f3..bf1e9347 100644 --- a/HISTORY +++ b/HISTORY @@ -2935,3 +2935,9 @@ Video Disk Recorder Revision History out this one). - Fixed cRingBufferLinear::Get() in case the buffer wraps around (thanks to Ludwig Nussel for reporting this one). + +2004-07-17: Version 1.3.12 + +- Removed all error messages from cRecordings::ScanVideoDir() and just skipping + entries that cause errors in order to avoid failure in case of things like + broken links etc. diff --git a/config.h b/config.h index 60c50a6d..3a67da64 100644 --- a/config.h +++ b/config.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.198 2004/06/10 13:18:50 kls Exp $ + * $Id: config.h 1.199 2004/07/17 11:09:42 kls Exp $ */ #ifndef __CONFIG_H @@ -20,8 +20,8 @@ #include "i18n.h" #include "tools.h" -#define VDRVERSION "1.3.11" -#define VDRVERSNUM 10311 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.3.12" +#define VDRVERSNUM 10312 // Version * 10000 + Major * 100 + Minor #define MAXPRIORITY 99 #define MAXLIFETIME 99 diff --git a/recording.c b/recording.c index cbc916a2..e33e2315 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.88 2004/06/13 20:25:19 kls Exp $ + * $Id: recording.c 1.89 2004/07/17 11:22:29 kls Exp $ */ #include "recording.h" @@ -626,7 +626,7 @@ cRecordings::cRecordings(bool Deleted) lastUpdate = 0; } -bool cRecordings::ScanVideoDir(const char *DirName) +void cRecordings::ScanVideoDir(const char *DirName) { DIR *d = opendir(DirName); if (d) { @@ -641,10 +641,10 @@ bool cRecordings::ScanVideoDir(const char *DirName) free(buffer); buffer = ReadLink(buffer); if (!buffer) - return false; + continue; if (stat(buffer, &st) != 0) { - LOG_ERROR_STR(DirName); - return false; + free(buffer); + continue; } } if (S_ISDIR(st.st_mode)) { @@ -655,24 +655,15 @@ bool cRecordings::ScanVideoDir(const char *DirName) else delete r; } - else if (!ScanVideoDir(buffer)) - return false; + else + ScanVideoDir(buffer); } } - else { - LOG_ERROR_STR(DirName); - return false; - } free(buffer); } } closedir(d); } - else { - LOG_ERROR_STR(DirName); - return false; - } - return true; } bool cRecordings::NeedsUpdate(void) diff --git a/recording.h b/recording.h index 04a1885b..88b90d3b 100644 --- a/recording.h +++ b/recording.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.h 1.30 2004/06/13 15:37:42 kls Exp $ + * $Id: recording.h 1.31 2004/07/17 11:09:49 kls Exp $ */ #ifndef __RECORDING_H @@ -72,7 +72,7 @@ class cRecordings : public cList { private: bool deleted; time_t lastUpdate; - bool ScanVideoDir(const char *DirName); + void ScanVideoDir(const char *DirName); public: cRecordings(bool Deleted = false); bool Load(void); -- cgit v1.2.3