From 6c4b3b8182ba78e70a811de4210b9de490740557 Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 27 2020 22:51:31 +0000 Subject: logging: distinguish between log-level 1 (service-info only) and log-level 2. --- diff --git a/src/log/toks_log_lpc_message.c b/src/log/toks_log_lpc_message.c index e266bd0..ee1b980 100644 --- a/src/log/toks_log_lpc_message.c +++ b/src/log/toks_log_lpc_message.c @@ -193,7 +193,7 @@ void toks_log_lpc_request( { struct toks_driver_ctx * drvctx = dctx->driver_ctx; - TOKS_LOG_LEVEL(drvctx,1); + TOKS_LOG_LEVEL(drvctx,2); nt_cid cid; char path[2048]; @@ -240,14 +240,13 @@ void toks_log_lpc_request( "%s.\n",path); } -void toks_log_lpc_reply( +static void toks_log_lpc_reply_impl( struct toks_daemon_ctx * dctx, const nt_tty_port_msg * msg) { struct toks_driver_ctx * drvctx = dctx->driver_ctx; - int opdata = msg->ttyinfo.opdata; - TOKS_LOG_LEVEL(drvctx,1); + TOKS_LOG_LEVEL(drvctx,2); nt_cid cid; char desc[1024]; @@ -280,6 +279,18 @@ void toks_log_lpc_reply( toks_lpc_msg_type_desc(msg->header.msg_type), msg->header.msg_id, desc); +} + +void toks_log_lpc_reply( + struct toks_daemon_ctx * dctx, + const nt_tty_port_msg * msg) +{ + struct toks_driver_ctx * drvctx = dctx->driver_ctx; + int opdata = msg->ttyinfo.opdata; + + TOKS_LOG_LEVEL(drvctx,1); + + toks_log_lpc_reply_impl(dctx,msg); if (dctx->opcode == TOKS_DAEMON_IOCTL) { if (opdata == TOKS_IOCTL_SET_TOKEN_COUNT)