Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Bug in vdr.c for syslogd ( vdr-1.1.20)
- To: vdr@linuxtv.org
- Subject: [vdr] Bug in vdr.c for syslogd ( vdr-1.1.20)
- From: Dimitrios Dimitrakos <mail@dimitrios.de>
- Date: Fri, 10 Jan 2003 11:59:52 +0100
- Content-transfer-encoding: 7bit
- Content-type: text/plain; charset=ISO-8859-1; format=flowed
- Reply-to: vdr@linuxtv.org
- Sender: vdr-bounce@linuxtv.org
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
Hi,
VDR Manual say :
Set logging to level. 0 = no logging, 1 = errors only, 2 = errors and
info, 3 = errors, info and debug. The
default logging level is 3. If logging should be done to LOG_LOCALn
instead of LOG_USER, add '.n' to LEVEL, as in
3.7 (n=0..7).
The bug is :
case 'l': {
char *p = strchr(optarg, '.');
if (p)
*p = 0;
if (isnumber(optarg)) {
int l = atoi(optarg);
if (0 <= l && l <= 3) {
SysLogLevel = l;
if (!p)
break;
if (isnumber(p + 1)) {
******* int l = atoi(optarg);
if (0 <= l && l <= 7) {
int targets[] = { LOG_LOCAL0,
LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6,
LOG_LOCAL7 };
SysLogTarget = targets[l];
break;
}
}
}
}
if (p)
*p = '.';
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
}
break;
.
.
.
After the check if (isnumber(p + 1)) {
int l must set to atoi( p+1 );
case 'l': {
char *p = strchr(optarg, '.');
if (p)
*p = 0;
if (isnumber(optarg)) {
int l = atoi(optarg);
if (0 <= l && l <= 3) {
SysLogLevel = l;
if (!p)
break;
if (isnumber(p + 1)) {
int l = atoi( p+1 );
if (0 <= l && l <= 7) {
int targets[] = { LOG_LOCAL0,
LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6,
LOG_LOCAL7 };
SysLogTarget = targets[l];
break;
}
}
}
}
if (p)
*p = '.';
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
}
break;
Greeting
Dimitri
--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index