You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2018/09/22 00:27:27 UTC

[3/8] guacamole-server git commit: GUACAMOLE-622: Implicitly invoke guac_terminal_start() if prompting is required.

GUACAMOLE-622: Implicitly invoke guac_terminal_start() if prompting is required.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/0b39b0fc
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/0b39b0fc
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/0b39b0fc

Branch: refs/heads/master
Commit: 0b39b0fc5fa9846ff350cc443b8f432efb4678ee
Parents: 61a51df
Author: Michael Jumper <mj...@apache.org>
Authored: Thu Aug 30 10:06:20 2018 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Sun Sep 2 23:04:14 2018 -0700

----------------------------------------------------------------------
 src/terminal/terminal.c          | 3 +++
 src/terminal/terminal/terminal.h | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0b39b0fc/src/terminal/terminal.c
----------------------------------------------------------------------
diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c
index 0427ae4..95e945d 100644
--- a/src/terminal/terminal.c
+++ b/src/terminal/terminal.c
@@ -943,6 +943,9 @@ char* guac_terminal_prompt(guac_terminal* terminal, const char* title,
     int pos;
     char in_byte;
 
+    /* Prompting implicitly requires user input */
+    guac_terminal_start(terminal);
+
     /* Print title */
     guac_terminal_printf(terminal, "%s", title);
 

http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/0b39b0fc/src/terminal/terminal/terminal.h
----------------------------------------------------------------------
diff --git a/src/terminal/terminal/terminal.h b/src/terminal/terminal/terminal.h
index 9a0145f..08094ba 100644
--- a/src/terminal/terminal/terminal.h
+++ b/src/terminal/terminal/terminal.h
@@ -652,7 +652,9 @@ void guac_terminal_notify(guac_terminal* terminal);
 /**
  * Reads a single line from this terminal's STDIN, storing the result in a
  * newly-allocated string. Input is retrieved in the same manner as
- * guac_terminal_read_stdin() and the same restrictions apply.
+ * guac_terminal_read_stdin() and the same restrictions apply. As reading input
+ * naturally requires user interaction, this function will implicitly invoke
+ * guac_terminal_start().
  *
  * @param terminal
  *     The terminal to which the provided title should be output, and from