mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Cleanup
This commit is contained in:
parent
3cc2d90fda
commit
f1144ca5cc
1 changed files with 9 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue