mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Removed all error messages from cRecordings::ScanVideoDir()
This commit is contained in:
		
							
								
								
									
										6
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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. | ||||
|   | ||||
							
								
								
									
										6
									
								
								config.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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 | ||||
|   | ||||
							
								
								
									
										23
									
								
								recording.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								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) | ||||
|   | ||||
| @@ -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<cRecording> { | ||||
| private: | ||||
|   bool deleted; | ||||
|   time_t lastUpdate; | ||||
|   bool ScanVideoDir(const char *DirName); | ||||
|   void ScanVideoDir(const char *DirName); | ||||
| public: | ||||
|   cRecordings(bool Deleted = false); | ||||
|   bool Load(void); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user