From 051701d566d1bc03c265979aac6251b336dcb460 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 12 Jan 2016 16:51:32 -0800 Subject: [PATCH] GUAC-1452: Provide for storage of pipe stream within terminal struct. --- src/terminal/terminal.c | 3 +++ src/terminal/terminal.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index cf7d84fe..9ee56812 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -326,6 +326,9 @@ guac_terminal* guac_terminal_create(guac_client* client, return NULL; } + /* Init pipe stream (output to display by default) */ + term->pipe_stream = NULL; + /* Init terminal lock */ pthread_mutex_init(&(term->lock), NULL); diff --git a/src/terminal/terminal.h b/src/terminal/terminal.h index 488692d6..3b244ae0 100644 --- a/src/terminal/terminal.h +++ b/src/terminal/terminal.h @@ -149,6 +149,13 @@ struct guac_terminal { */ int stdin_pipe_fd[2]; + /** + * The currently-open pipe stream to which all terminal output should be + * written, if any. If no pipe stream is open, terminal output will be + * written to the terminal display, and this value will be NULL. + */ + guac_stream* pipe_stream; + /** * Graphical representation of the current scroll state. */