diff options
author | Linus Nordberg <linus@nordu.net> | 2011-12-12 13:44:17 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-12-12 13:59:33 +0100 |
commit | 000cfa8160cf40bdf8f4c936715dcaeaf3360dc2 (patch) | |
tree | 9e065743b2a28f1cf3747af9b1f0c84c6ffe8bcb | |
parent | 56699476c1abf0105c368c8a1eae5080f1e25a86 (diff) | |
parent | ac5c1024b9027a76e176169d2f2a5c73514a7710 (diff) |
Clean up ac5c1024.
-rw-r--r-- | debug.c | 24 |
1 files changed, 11 insertions, 13 deletions
@@ -107,23 +107,21 @@ int debug_set_destination(char *dest, int log_type) { break; if (!facstrings[i]) debugx(1, DBG_ERR, "Unknown syslog facility %s", dest); - if (log_type == FTICKS_LOG) - fticks_syslogfacility = facvals[i]; - else + if (log_type != FTICKS_LOG) debug_syslogfacility = facvals[i]; +#if defined(WANT_FTICKS) + else if (log_type == FTICKS_LOG) + fticks_syslogfacility = facvals[i]; +#endif } else { - if (log_type == FTICKS_LOG) - fticks_syslogfacility = 0; - else + if (log_type != FTICKS_LOG) debug_syslogfacility = LOG_DAEMON; +#if defined(WANT_FTICKS) + else if (log_type == FTICKS_LOG) + fticks_syslogfacility = 0; +#endif } - if (log_type == FTICKS_LOG) { - if (fticks_syslogfacility && !debug_syslogfacility) { - openlog(debug_ident, LOG_PID, fticks_syslogfacility); - } - } else { - openlog(debug_ident, LOG_PID, debug_syslogfacility); - } + openlog(debug_ident, LOG_PID, debug_syslogfacility); return 1; } debug(DBG_ERR, "Unknown log destination, exiting %s", dest); |