mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Only reporting the 'EPG bugfix statistics' if there really were any fixes
This commit is contained in:
parent
889e70803f
commit
fe9b2103f3
1
HISTORY
1
HISTORY
@ -976,3 +976,4 @@ Video Disk Recorder Revision History
|
|||||||
(thanks to Matthias Schniedermeyer for helping to debug this one).
|
(thanks to Matthias Schniedermeyer for helping to debug this one).
|
||||||
- Changed the estimated data rate for calculating the remaining disk capacity
|
- Changed the estimated data rate for calculating the remaining disk capacity
|
||||||
to 25.75 MB/min.
|
to 25.75 MB/min.
|
||||||
|
- Only reporting the 'EPG bugfix statistics' if there really were any fixes.
|
||||||
|
47
eit.c
47
eit.c
@ -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.33 2002/02/02 12:12:26 kls Exp $
|
* $Id: eit.c 1.34 2002/02/09 14:48:43 kls Exp $
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "eit.h"
|
#include "eit.h"
|
||||||
@ -352,7 +352,7 @@ void cEventInfo::Dump(FILE *f, const char *Prefix) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define MAXEPGBUGFIXSTATS 6
|
#define MAXEPGBUGFIXSTATS 5
|
||||||
#define MAXEPGBUGFIXCHANS 50
|
#define MAXEPGBUGFIXCHANS 50
|
||||||
struct tEpgBugFixStats {
|
struct tEpgBugFixStats {
|
||||||
int hits;
|
int hits;
|
||||||
@ -381,32 +381,39 @@ static void EpgBugFixStat(int Number, unsigned int ServiceID)
|
|||||||
static void ReportEpgBugFixStats(bool Reset = false)
|
static void ReportEpgBugFixStats(bool Reset = false)
|
||||||
{
|
{
|
||||||
if (Setup.EPGBugfixLevel > 0) {
|
if (Setup.EPGBugfixLevel > 0) {
|
||||||
dsyslog(LOG_INFO, "=====================");
|
bool GotHits = false;
|
||||||
dsyslog(LOG_INFO, "EPG bugfix statistics");
|
|
||||||
dsyslog(LOG_INFO, "=====================");
|
|
||||||
dsyslog(LOG_INFO, "IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED");
|
|
||||||
dsyslog(LOG_INFO, "CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()");
|
|
||||||
dsyslog(LOG_INFO, "IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!");
|
|
||||||
dsyslog(LOG_INFO, "=====================");
|
|
||||||
dsyslog(LOG_INFO, "Fix\tHits\tChannels");
|
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
for (int i = 0; i < MAXEPGBUGFIXSTATS; i++) {
|
for (int i = 0; i < MAXEPGBUGFIXSTATS; i++) {
|
||||||
const char *delim = "\t";
|
const char *delim = "\t";
|
||||||
tEpgBugFixStats *p = &EpgBugFixStats[i];
|
tEpgBugFixStats *p = &EpgBugFixStats[i];
|
||||||
char *q = buffer;
|
if (p->hits) {
|
||||||
q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
|
if (!GotHits) {
|
||||||
for (int c = 0; c < p->n; c++) {
|
dsyslog(LOG_INFO, "=====================");
|
||||||
cChannel *channel = Channels.GetByServiceID(p->serviceIDs[c]);
|
dsyslog(LOG_INFO, "EPG bugfix statistics");
|
||||||
if (channel) {
|
dsyslog(LOG_INFO, "=====================");
|
||||||
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->name);
|
dsyslog(LOG_INFO, "IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED");
|
||||||
delim = ", ";
|
dsyslog(LOG_INFO, "CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()");
|
||||||
|
dsyslog(LOG_INFO, "IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!");
|
||||||
|
dsyslog(LOG_INFO, "=====================");
|
||||||
|
dsyslog(LOG_INFO, "Fix\tHits\tChannels");
|
||||||
|
GotHits = true;
|
||||||
|
}
|
||||||
|
char *q = buffer;
|
||||||
|
q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits);
|
||||||
|
for (int c = 0; c < p->n; c++) {
|
||||||
|
cChannel *channel = Channels.GetByServiceID(p->serviceIDs[c]);
|
||||||
|
if (channel) {
|
||||||
|
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->name);
|
||||||
|
delim = ", ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
dsyslog(LOG_INFO, "%s", buffer);
|
||||||
dsyslog(LOG_INFO, "%s", buffer);
|
}
|
||||||
if (Reset)
|
if (Reset)
|
||||||
p->hits = p->n = 0;
|
p->hits = p->n = 0;
|
||||||
}
|
}
|
||||||
dsyslog(LOG_INFO, "=====================");
|
if (GotHits)
|
||||||
|
dsyslog(LOG_INFO, "=====================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user