diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-28 13:08:09 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2017-05-28 13:08:09 +0200 |
commit | 2751e239eba118a319c1c8518fb199dc5d4114e4 (patch) | |
tree | 411481a6776b71cbd363680827a6c1b17bc3ebe0 /epg.c | |
parent | 0af3ed548c86b5b2670fbf5610ee41d36b48761a (diff) | |
download | vdr-2751e239eba118a319c1c8518fb199dc5d4114e4.tar.gz vdr-2751e239eba118a319c1c8518fb199dc5d4114e4.tar.bz2 |
Fixed the locking sequence when dumping EPG data
Diffstat (limited to 'epg.c')
-rw-r--r-- | epg.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * - * $Id: epg.c 4.7 2017/05/28 11:30:32 kls Exp $ + * $Id: epg.c 4.8 2017/05/28 13:08:09 kls Exp $ */ #include "epg.h" @@ -1104,9 +1104,8 @@ void cSchedule::Cleanup(time_t Time) } } -void cSchedule::Dump(FILE *f, const char *Prefix, eDumpMode DumpMode, time_t AtTime) const +void cSchedule::Dump(const cChannels *Channels, FILE *f, const char *Prefix, eDumpMode DumpMode, time_t AtTime) const { - LOCK_CHANNELS_READ; if (const cChannel *Channel = Channels->GetByChannelID(channelID, true)) { fprintf(f, "%sC %s %s\n", Prefix, *Channel->GetChannelID().ToString(), Channel->Name()); const cEvent *p; @@ -1280,9 +1279,10 @@ bool cSchedules::Dump(FILE *f, const char *Prefix, eDumpMode DumpMode, time_t At return false; } } + LOCK_CHANNELS_READ; LOCK_SCHEDULES_READ; for (const cSchedule *p = Schedules->First(); p; p = Schedules->Next(p)) - p->Dump(f, Prefix, DumpMode, AtTime); + p->Dump(Channels, f, Prefix, DumpMode, AtTime); if (sf) { sf->Close(); delete sf; |