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

Fixed EPG bugfix statistics to avoid log entires for undefined channels

This commit is contained in:
Klaus Schmidinger 2003-05-18 14:13:02 +02:00
parent c58f61392b
commit 2ec3f0342b
3 changed files with 26 additions and 14 deletions

View File

@ -665,3 +665,7 @@ Matthias Raus <matthias-raus@web.de>
Marc Rovira Vall <tm05462@salleURL.edu> and Ramon Roca <ramon.roca@xcombo.com> Marc Rovira Vall <tm05462@salleURL.edu> and Ramon Roca <ramon.roca@xcombo.com>
for translating OSD texts to the Catalanian language for translating OSD texts to the Catalanian language
Lars Bläser <LBlaeser@hofheim.de>
for reporting a bug in EPG bugfix statistics which made log entires for undefined
channels

View File

@ -2168,3 +2168,5 @@ Video Disk Recorder Revision History
- Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt). - Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt).
- Fixed reading 'epg.data' for channels with non-zero RID (thanks to Oliver - Fixed reading 'epg.data' for channels with non-zero RID (thanks to Oliver
Endriss for reporting this one). Endriss for reporting this one).
- Fixed EPG bugfix statistics to avoid log entires for undefined channels (thanks
to Lars Bläser for reporting this one).

16
eit.c
View File

@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or * * the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
* $Id: eit.c 1.77 2003/05/18 13:13:31 kls Exp $ * $Id: eit.c 1.78 2003/05/18 14:10:25 kls Exp $
***************************************************************************/ ***************************************************************************/
#include "eit.h" #include "eit.h"
@ -434,6 +434,12 @@ static void ReportEpgBugFixStats(bool Reset = false)
const char *delim = "\t"; const char *delim = "\t";
tEpgBugFixStats *p = &EpgBugFixStats[i]; tEpgBugFixStats *p = &EpgBugFixStats[i];
if (p->hits) { if (p->hits) {
bool PrintedStats = false;
char *q = buffer;
*buffer = 0;
for (int c = 0; c < p->n; c++) {
cChannel *channel = Channels.GetByChannelID(p->channelIDs[c], true);
if (channel) {
if (!GotHits) { if (!GotHits) {
dsyslog("====================="); dsyslog("=====================");
dsyslog("EPG bugfix statistics"); dsyslog("EPG bugfix statistics");
@ -445,15 +451,15 @@ static void ReportEpgBugFixStats(bool Reset = false)
dsyslog("Fix\tHits\tChannels"); dsyslog("Fix\tHits\tChannels");
GotHits = true; GotHits = true;
} }
char *q = buffer; if (!PrintedStats) {
q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits); q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
for (int c = 0; c < p->n; c++) { PrintedStats = true;
cChannel *channel = Channels.GetByChannelID(p->channelIDs[c], true); }
if (channel) {
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name()); q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name());
delim = ", "; delim = ", ";
} }
} }
if (*buffer)
dsyslog("%s", buffer); dsyslog("%s", buffer);
} }
if (Reset) if (Reset)