ttynvt: Tweak some log/debug messages

This commit is contained in:
Kim Woelders
2023-02-09 07:25:18 +01:00
parent 9e99ec69b4
commit 05b9b13b04
+7 -4
View File
@@ -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);