summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-05-18 14:13:02 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-05-18 14:13:02 +0200
commit2ec3f0342be3fdd18eacda34ca81e8c6c66a32a2 (patch)
tree5143447265f075ff6f1dc1ce093ab6b0d5a1836b /eit.c
parentc58f61392b29d1583ab46e6918b0fa57f06b687b (diff)
downloadvdr-2ec3f0342be3fdd18eacda34ca81e8c6c66a32a2.tar.gz
vdr-2ec3f0342be3fdd18eacda34ca81e8c6c66a32a2.tar.bz2
Fixed EPG bugfix statistics to avoid log entires for undefined channels
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/eit.c b/eit.c
index d1680992..a5b14e76 100644
--- a/eit.c
+++ b/eit.c
@@ -16,7 +16,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (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"
@@ -434,27 +434,33 @@ static void ReportEpgBugFixStats(bool Reset = false)
const char *delim = "\t";
tEpgBugFixStats *p = &EpgBugFixStats[i];
if (p->hits) {
- if (!GotHits) {
- dsyslog("=====================");
- dsyslog("EPG bugfix statistics");
- dsyslog("=====================");
- dsyslog("IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED");
- dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()");
- dsyslog("IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!");
- dsyslog("=====================");
- dsyslog("Fix\tHits\tChannels");
- GotHits = true;
- }
+ bool PrintedStats = false;
char *q = buffer;
- q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
+ *buffer = 0;
for (int c = 0; c < p->n; c++) {
cChannel *channel = Channels.GetByChannelID(p->channelIDs[c], true);
if (channel) {
+ if (!GotHits) {
+ dsyslog("=====================");
+ dsyslog("EPG bugfix statistics");
+ dsyslog("=====================");
+ dsyslog("IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED");
+ dsyslog("CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()");
+ dsyslog("IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!");
+ dsyslog("=====================");
+ dsyslog("Fix\tHits\tChannels");
+ GotHits = true;
+ }
+ if (!PrintedStats) {
+ q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
+ PrintedStats = true;
+ }
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name());
delim = ", ";
}
}
- dsyslog("%s", buffer);
+ if (*buffer)
+ dsyslog("%s", buffer);
}
if (Reset)
p->hits = p->n = 0;