1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling the timer counter in cSchedule::DelEvent()

This commit is contained in:
Klaus Schmidinger 2021-04-06 09:01:26 +02:00
parent 23d986657a
commit 7fb13b3cbf
2 changed files with 10 additions and 2 deletions

View File

@ -9578,7 +9578,7 @@ Video Disk Recorder Revision History
given (reported by Manuel Reimer). given (reported by Manuel Reimer).
- Fixed handling $(PKG_CONFIG) in newplugin (thanks to Winfried Köhler). - Fixed handling $(PKG_CONFIG) in newplugin (thanks to Winfried Köhler).
2021-04-05: 2021-04-06:
- Fixed strreplace() to handle NULL strings (reported by Jürgen Schneider). - Fixed strreplace() to handle NULL strings (reported by Jürgen Schneider).
- Somewhere down the road the 'x' bit of Doxyfile.filter got lost, so the - Somewhere down the road the 'x' bit of Doxyfile.filter got lost, so the
@ -9635,3 +9635,4 @@ Video Disk Recorder Revision History
previous and next event. previous and next event.
- Spawned timers that don't use VPS now automatically adjust their start/stop times - Spawned timers that don't use VPS now automatically adjust their start/stop times
to changes in the respective event's times. to changes in the respective event's times.
- Fixed handling the timer counter in cSchedule::DelEvent().

9
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $Id: epg.c 5.2 2021/04/04 11:06:30 kls Exp $ * $Id: epg.c 5.3 2021/04/06 09:01:26 kls Exp $
*/ */
#include "epg.h" #include "epg.h"
@ -951,6 +951,13 @@ void cSchedule::DelEvent(cEvent *Event)
if (Event->schedule == this) { if (Event->schedule == this) {
UnhashEvent(Event); UnhashEvent(Event);
Event->schedule = NULL; Event->schedule = NULL;
// Removing the event from its schedule prevents it from decrementing the
// schedule's timer counter, so we do it here:
cEvent::numTimersMutex.Lock();
numTimersMutex.Lock();
numTimers -= Event->numTimers;
numTimersMutex.Unlock();
cEvent::numTimersMutex.Unlock();
events.Del(Event); events.Del(Event);
} }
} }