From 2f11c330cdd933831f03743b2d691dcecc3558d2 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sat, 24 Aug 2024 09:38:01 +0300 Subject: [PATCH] tpws: do not set debug level=1 in --debug if already raised to 2 --- tpws/tpws.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tpws/tpws.c b/tpws/tpws.c index 034598e..ff4a97f 100644 --- a/tpws/tpws.c +++ b/tpws/tpws.c @@ -730,12 +730,12 @@ void parse_params(int argc, char *argv[]) } if (params.droproot && chown(params.debug_logfile, params.uid, -1)) fprintf(stderr, "could not chown %s. log file may not be writable after privilege drop\n", params.debug_logfile); - params.debug = 1; + if (!params.debug) params.debug = 1; params.debug_target = LOG_TARGET_FILE; } else if (!strcmp(optarg,"syslog")) { - params.debug = 1; + if (!params.debug) params.debug = 1; params.debug_target = LOG_TARGET_SYSLOG; openlog("tpws",LOG_PID,LOG_USER); }