summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorMaja Gorecka-Wolniewicz <mgw@puma.uci.umk.pl>2011-12-12 12:43:24 +0100
committerMaja Gorecka-Wolniewicz <mgw@puma.uci.umk.pl>2011-12-12 12:43:24 +0100
commitac5c1024b9027a76e176169d2f2a5c73514a7710 (patch)
tree8bcdd4dcb3b7d7488f6538b8802ff31d5345e572 /debug.c
parente41e5198e5b93a21c0997fd9f7e9ed7f28b8aea0 (diff)
formatting and skipping openlog call for FTOCKS_LOG
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/debug.c b/debug.c
index 9a3512b..4f8f51c 100644
--- a/debug.c
+++ b/debug.c
@@ -104,22 +104,21 @@ int debug_set_destination(char *dest, int log_type) {
break;
if (!facstrings[i])
debugx(1, DBG_ERR, "Unknown syslog facility %s", dest);
+#if defined(WANT_FTICKS)
if (log_type==FTICKS_LOG)
fticks_syslogfacility = facvals[i];
- else
+#endif
+ if (log_type!=FTICKS_LOG)
debug_syslogfacility = facvals[i];
} else {
+#if defined(WANT_FTICKS)
if (log_type==FTICKS_LOG)
fticks_syslogfacility = 0;
- else
+#endif
+ if (log_type!=FTICKS_LOG)
debug_syslogfacility = LOG_DAEMON;
}
- 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);