From d6d48d26bf2b1e510de3e79a2e7967796d7a99e4 Mon Sep 17 00:00:00 2001 From: bol-van Date: Fri, 23 Aug 2024 15:31:07 +0300 Subject: [PATCH] nfqws: open syslog only if --debug=syslog --- nfq/nfqws.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nfq/nfqws.c b/nfq/nfqws.c index d067aea..1dcd04c 100644 --- a/nfq/nfqws.c +++ b/nfq/nfqws.c @@ -1102,6 +1102,7 @@ int main(int argc, char **argv) { params.debug = true; params.debug_target = LOG_TARGET_SYSLOG; + openlog(progname,LOG_PID,LOG_USER); } else { @@ -1666,9 +1667,6 @@ int main(int argc, char **argv) } } - if (params.debug && params.debug_target==LOG_TARGET_SYSLOG) - openlog(progname,LOG_PID,LOG_USER); - #ifdef __linux__ if (params.qnum<0) {