Cosmetics

This commit is contained in:
Kim Woelders
2018-10-15 07:57:26 +02:00
parent 00430e5f64
commit 2d993212c5
+8 -6
View File
@@ -66,12 +66,13 @@ typedef struct {
char tmp_buf[TMP_BUF_SIZE];
struct termios tio;
int cmcr;
int epipe;
int cmcr;
volatile int smcr;
volatile int error;
volatile int pollin;
volatile int error;
int epipe;
tn_ctx_t *tn;
} ttynvt_t;
@@ -201,9 +202,9 @@ static void *_read_net(void *arg)
{
if (errno == EINTR)
continue;
else
break;
}
if (tty->fds[FD_NET].revents & POLLIN)
{
res = read(tty->fds[FD_NET].fd, tty->net_buf + tty->net_cnt,
@@ -213,7 +214,7 @@ static void *_read_net(void *arg)
_log(LOG_ERR, "net read error: %s\n", strerror(errno));
break;
}
else if (res == 0)
if (res == 0)
{
_log(LOG_INFO, "Connection closed by remote host\n");
break;
@@ -232,6 +233,7 @@ static void *_read_net(void *arg)
tty->net_cnt = 0;
}
}
if (tty->fds[FD_MASTER].revents & POLLIN)
{
res = read(tty->fds[FD_MASTER].fd, tty->tmp_buf, TMP_BUF_SIZE);
@@ -242,6 +244,7 @@ static void *_read_net(void *arg)
}
telnet_tx(tty->tn, tty->tmp_buf, res);
}
if (tty->fds[FD_SLAVE].revents & POLLIN)
{
tty->pollin = 1;
@@ -838,7 +841,6 @@ ttynvt_ioctl(fuse_req_t req, int cmd, void *arg,
case TIOCSETD:
CHECK_BUF_IN(sizeof(int));
val = *(int *)in_buf;
res = ioctl(tty->fds[FD_SLAVE].fd, TIOCSETD, &val);
if (res < 0)
fuse_reply_err(req, errno);