This commit is contained in:
Martin Lund 2024-04-18 13:29:06 +02:00
parent 3cc2d90fda
commit f1144ca5cc

View file

@ -1695,7 +1695,10 @@ int tty_connect(void)
bool forward = false; bool forward = false;
if (FD_ISSET(device_fd, &rdfs)) if (FD_ISSET(device_fd, &rdfs))
{ {
/*******************************/
/* Input from tty device ready */ /* Input from tty device ready */
/*******************************/
ssize_t bytes_read = read(device_fd, input_buffer, BUFSIZ); ssize_t bytes_read = read(device_fd, input_buffer, BUFSIZ);
if (bytes_read <= 0) if (bytes_read <= 0)
{ {
@ -1777,7 +1780,10 @@ int tty_connect(void)
} }
else if (FD_ISSET(pipefd[0], &rdfs)) else if (FD_ISSET(pipefd[0], &rdfs))
{ {
/**************************/
/* Input from stdin ready */ /* Input from stdin ready */
/**************************/
ssize_t bytes_read = read(pipefd[0], input_buffer, BUFSIZ); ssize_t bytes_read = read(pipefd[0], input_buffer, BUFSIZ);
if (bytes_read < 0) if (bytes_read < 0)
{ {
@ -1931,7 +1937,10 @@ int tty_connect(void)
} }
else else
{ {
/***************************/
/* Input from socket ready */ /* Input from socket ready */
/***************************/
forward = socket_handle_input(&rdfs, &output_char); forward = socket_handle_input(&rdfs, &output_char);
if (forward) if (forward)