mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Fixed handling "pending" timers that blocked others that actually could record
This commit is contained in:
		| @@ -844,6 +844,8 @@ Ludwig Nussel <ludwig.nussel@web.de> | ||||
| Thomas Koch <tom@harhar.net> | ||||
|  for his support in keeping the Premiere World channels up to date in 'channels.conf' | ||||
|  for implementing the SVDRP command STAT | ||||
|  for reporting a problem with "pending" timers that blocked others that actually | ||||
|  could record | ||||
|  | ||||
| Stefan Hu<48>feldt <vdr@marvin.on-luebeck.de> | ||||
|  for his help in keeping 'channels.conf.cable' up to date | ||||
|   | ||||
							
								
								
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								HISTORY
									
									
									
									
									
								
							| @@ -4278,3 +4278,5 @@ Video Disk Recorder Revision History | ||||
| - Fixed setting "No title" for broken event data (reported by Ronny Kornexl). | ||||
| - Fixed channel up/down switching on single card systems (reported by Stefan | ||||
|   Huelswitt). | ||||
| - Fixed handling "pending" timers that blocked others that actually could record | ||||
|   (reported by Thomas Koch). | ||||
|   | ||||
							
								
								
									
										11
									
								
								timers.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								timers.c
									
									
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|  * See the main source file 'vdr.c' for copyright information and | ||||
|  * how to reach the author. | ||||
|  * | ||||
|  * $Id: timers.c 1.45 2006/01/28 15:09:05 kls Exp $ | ||||
|  * $Id: timers.c 1.46 2006/02/03 15:20:14 kls Exp $ | ||||
|  */ | ||||
|  | ||||
| #include "timers.h" | ||||
| @@ -535,13 +535,22 @@ cTimer *cTimers::GetTimer(cTimer *Timer) | ||||
|  | ||||
| cTimer *cTimers::GetMatch(time_t t) | ||||
| { | ||||
|   static int LastPending = -1; | ||||
|   cTimer *t0 = NULL; | ||||
|   for (cTimer *ti = First(); ti; ti = Next(ti)) { | ||||
|       if (!ti->Recording() && ti->Matches(t)) { | ||||
|          if (ti->Pending()) { | ||||
|             if (ti->Index() > LastPending) | ||||
|                LastPending = ti->Index(); | ||||
|             else | ||||
|                continue; | ||||
|             } | ||||
|          if (!t0 || ti->Priority() > t0->Priority()) | ||||
|             t0 = ti; | ||||
|          } | ||||
|       } | ||||
|   if (!t0) | ||||
|      LastPending = -1; | ||||
|   return t0; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user