[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/guacamole-server/pull/173


---


[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-18 Thread mike-jumper
Github user mike-jumper commented on a diff in the pull request:

https://github.com/apache/guacamole-server/pull/173#discussion_r196231052
  
--- Diff: src/terminal/terminal/terminal.h ---
@@ -568,17 +576,97 @@ int guac_terminal_printf(guac_terminal* terminal, 
const char* format, ...);
 
 /**
  * Handles the given key event, sending data, scrolling, pasting clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the key event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
+ * The user that originated the key event.
+ *
+ * @param keysym
+ * The X11 keysym of the key that was pressed or released.
+ *
+ * @param pressed
+ * Non-zero if the key represented by the given keysym is currently
+ * pressed, zero if it is released.
+ *
+ * @return
+ * Zero if the key event was handled successfully, non-zero otherwise.
  */
 int guac_terminal_send_key(guac_terminal* term, int keysym, int pressed);
 
 /**
  * Handles the given mouse event, sending data, scrolling, pasting 
clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the mouse event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
+ * The user that originated the mouse event.
+ *
+ * @param x
+ * The X coordinate of the mouse within the display when the event
+ * occurred, in pixels. This value is not guaranteed to be within the
+ * bounds of the display area.
+ *
+ * @param y
+ * The Y coordinate of the mouse within the display when the event
+ * occurred, in pixels. This value is not guaranteed to be within the
+ * bounds of the display area.
+ *
+ * @param button_mask
--- End diff --

`mask`. Copypasta for sure. Will fix this, too.


---


[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-18 Thread mike-jumper
Github user mike-jumper commented on a diff in the pull request:

https://github.com/apache/guacamole-server/pull/173#discussion_r196230925
  
--- Diff: src/terminal/terminal/terminal.h ---
@@ -568,17 +576,97 @@ int guac_terminal_printf(guac_terminal* terminal, 
const char* format, ...);
 
 /**
  * Handles the given key event, sending data, scrolling, pasting clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the key event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
--- End diff --

Yep. Will fix.


---


[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-18 Thread necouchman
Github user necouchman commented on a diff in the pull request:

https://github.com/apache/guacamole-server/pull/173#discussion_r196084299
  
--- Diff: src/terminal/terminal/terminal.h ---
@@ -568,17 +576,97 @@ int guac_terminal_printf(guac_terminal* terminal, 
const char* format, ...);
 
 /**
  * Handles the given key event, sending data, scrolling, pasting clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the key event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
+ * The user that originated the key event.
+ *
+ * @param keysym
+ * The X11 keysym of the key that was pressed or released.
+ *
+ * @param pressed
+ * Non-zero if the key represented by the given keysym is currently
+ * pressed, zero if it is released.
+ *
+ * @return
+ * Zero if the key event was handled successfully, non-zero otherwise.
  */
 int guac_terminal_send_key(guac_terminal* term, int keysym, int pressed);
 
 /**
  * Handles the given mouse event, sending data, scrolling, pasting 
clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the mouse event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
+ * The user that originated the mouse event.
+ *
+ * @param x
+ * The X coordinate of the mouse within the display when the event
+ * occurred, in pixels. This value is not guaranteed to be within the
+ * bounds of the display area.
+ *
+ * @param y
+ * The Y coordinate of the mouse within the display when the event
+ * occurred, in pixels. This value is not guaranteed to be within the
+ * bounds of the display area.
+ *
+ * @param button_mask
--- End diff --

`button_mask` or `mask`?


---


[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-18 Thread necouchman
Github user necouchman commented on a diff in the pull request:

https://github.com/apache/guacamole-server/pull/173#discussion_r196083987
  
--- Diff: src/terminal/terminal/terminal.h ---
@@ -568,17 +576,97 @@ int guac_terminal_printf(guac_terminal* terminal, 
const char* format, ...);
 
 /**
  * Handles the given key event, sending data, scrolling, pasting clipboard
- * data, etc. as necessary.
+ * data, etc. as necessary. If terminal input is currently coming from a
+ * stream due to a prior call to guac_terminal_send_stream(), any input
+ * which would normally result from the key event is dropped.
+ *
+ * @param term
+ * The terminal which should receive the given data on STDIN.
+ *
+ * @param user
--- End diff --

I don't see the `user` parameter actually in the function stub?


---


[GitHub] guacamole-server pull request #173: GUACAMOLE-574: Allow input for SSH/telne...

2018-06-17 Thread mike-jumper
GitHub user mike-jumper opened a pull request:

https://github.com/apache/guacamole-server/pull/173

GUACAMOLE-574: Allow input for SSH/telnet to come from "STDIN" pipe.

This change adds support to SSH and telnet for reading user input from a 
pipe stream named "STDIN". When the client side opens this pipe stream, user 
input through keyboard, clipboard, etc. is blocked, and data from the pipe 
stream is sent directly over the SSH/telnet connection. User input is unblocked 
once the "STDIN" pipe is closed.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mike-jumper/guacamole-server terminal-pipe

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/guacamole-server/pull/173.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #173


commit ef79a6ec5986bb8feaf1acd80996088ab35dfe0f
Author: Michael Jumper 
Date:   2018-05-19T21:28:09Z

GUACAMOLE-574: Add support for reading STDIN from a pipe stream.

commit c5d29a6884c6b65225aeebb3a3fbb8f52a3d65d5
Author: Michael Jumper 
Date:   2018-05-19T21:32:30Z

GUACAMOLE-574: Redirect STDIN from pipe stream named "STDIN" for SSH and 
telnet.




---