mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
ticket refs #4591: CWMP: incorrect logging to syslog (fix log_to_sylog uci option behaviour)
This commit is contained in:
parent
00ac93d867
commit
09a669ffa8
1 changed files with 2 additions and 4 deletions
6
log.c
6
log.c
|
|
@ -80,7 +80,7 @@ extern char *__progname;
|
|||
|
||||
int log_set_on_syslog(char *value)
|
||||
{
|
||||
if (strcmp(value, "enable") == 0) {
|
||||
if ((strcasecmp(value, "TRUE") == 0) || (strcmp(value, "1") == 0) || (strcasecmp(value, "enable") == 0)) {
|
||||
char ident[256];
|
||||
|
||||
enable_log_syslog = true;
|
||||
|
|
@ -89,9 +89,7 @@ int log_set_on_syslog(char *value)
|
|||
snprintf(ident, sizeof(ident), "%s[%d]", __progname, getpid());
|
||||
ident[sizeof(ident) - 1] = '\0';
|
||||
openlog(ident, LOG_NDELAY, LOG_LOCAL1);
|
||||
}
|
||||
|
||||
if (strcmp(value, "disable") == 0) {
|
||||
} else {
|
||||
enable_log_syslog = false;
|
||||
}
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue