From cd09f7a0dfad60a9451b30fc2c4261a3c867beee Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 20 Jan 2006 13:42:38 +0100 Subject: Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule' pointers from cChannel objects --- CONTRIBUTORS | 3 +++ HISTORY | 2 ++ epg.c | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 2d4eb0d8..fe0481ae 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1667,3 +1667,6 @@ Francois-Xavier Kowalski Franz Gangkofer for reporting a problem with @plugin in keymacros.conf in case the named plugin is not loaded + +Malte Schröder + for reporting a crash after executing the SVDRP command CLRE diff --git a/HISTORY b/HISTORY index 9b5d7df3..576b6b4c 100644 --- a/HISTORY +++ b/HISTORY @@ -4198,3 +4198,5 @@ Video Disk Recorder Revision History the individual thread's pid (based on a suggestion from Francois-Xavier Kowalski). - Fixed a problem with @plugin in keymacros.conf in case the named plugin is not loaded (reported by Franz Gangkofer). +- Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule' + pointers from cChannel objects (reported by Malte Schröder). diff --git a/epg.c b/epg.c index 79c11762..93104f0e 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 1.49 2006/01/15 13:58:30 kls Exp $ + * $Id: epg.c 1.50 2006/01/20 13:42:38 kls Exp $ */ #include "epg.h" @@ -935,7 +935,10 @@ bool cSchedules::ClearAll(void) cSchedulesLock SchedulesLock(true, 1000); cSchedules *s = (cSchedules *)Schedules(SchedulesLock); if (s) { - s->Clear(); + for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer)) + Timer->SetEvent(NULL); + for (cSchedule *Schedule = s->First(); Schedule; Schedule = s->Next(Schedule)) + Schedule->Cleanup(INT_MAX); return true; } return false; -- cgit v1.2.3