summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-28 13:08:09 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-28 13:08:09 +0200
commit2751e239eba118a319c1c8518fb199dc5d4114e4 (patch)
tree411481a6776b71cbd363680827a6c1b17bc3ebe0 /epg.c
parent0af3ed548c86b5b2670fbf5610ee41d36b48761a (diff)
downloadvdr-2751e239eba118a319c1c8518fb199dc5d4114e4.tar.gz
vdr-2751e239eba118a319c1c8518fb199dc5d4114e4.tar.bz2
Fixed the locking sequence when dumping EPG data
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epg.c b/epg.c
index 3955d702..486844e5 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 <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;