From 05b9b13b04403b21e0892eba04fcbf9e978dc59a Mon Sep 17 00:00:00 2001 From: Kim Woelders Date: Thu, 9 Feb 2023 07:25:18 +0100 Subject: [PATCH] ttynvt: Tweak some log/debug messages --- src/ttynvt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ttynvt.c b/src/ttynvt.c index 1d3240b..2ed59e7 100644 --- a/src/ttynvt.c +++ b/src/ttynvt.c @@ -137,7 +137,7 @@ static void ttynvt_release(fuse_req_t req, struct fuse_file_info *info) { ttynvt_t *tty = (ttynvt_t *) (uintptr_t) info->fh; - nvt_log(LOG_INFO, "connection closed\n"); + DBG("%s\n", __func__); tty->rel_pending = 1; _fd_close(tty->fds[FD_NET].fd); @@ -155,6 +155,9 @@ static void ttynvt_release(fuse_req_t req, struct fuse_file_info *info) free(tty->tn); free(tty); fuse_reply_err(req, 0); + + nvt_log(LOG_INFO, "Disconnected from server: %s:%d\n", + ttynvt_param.host, ttynvt_param.port); } static void _notify(ttynvt_t * tty) @@ -238,7 +241,7 @@ static void *_read_net(void *arg) } if (res == 0) { - nvt_log(LOG_INFO, "Connection closed by remote host\n"); + nvt_log(LOG_NOTICE, "Connection closed by remote host\n"); break; } tty->net_cnt += res; @@ -428,7 +431,8 @@ static void ttynvt_open(fuse_req_t req, struct fuse_file_info *info) int res; int n; - DBG("%s\n", __func__); + nvt_log(LOG_INFO, "Connecting to server: %s:%d\n", + ttynvt_param.host, ttynvt_param.port); tty = calloc(1, sizeof(*tty)); if (!tty) @@ -521,7 +525,6 @@ static void ttynvt_open(fuse_req_t req, struct fuse_file_info *info) return; open_err: - nvt_log(LOG_INFO, "Connection to server: %s:%d failed: %m\n", ttynvt_param.host, ttynvt_param.port);