You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/05/24 03:46:09 UTC

[2/5] incubator-guacamole-server git commit: GUACAMOLE-33: Implement leave handlers for RDP, SSH, and telnet.

GUACAMOLE-33: Implement leave handlers for RDP, SSH, and telnet.


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

Branch: refs/heads/master
Commit: 82fd6a279b110a7d1cab7a7f3c48c9dfcaecb7e3
Parents: 46b29ed
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Apr 18 19:03:38 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon May 23 13:58:30 2016 -0700

----------------------------------------------------------------------
 src/protocols/rdp/user.c    |  9 +++++++++
 src/protocols/rdp/user.h    |  5 +++++
 src/protocols/ssh/user.c    |  9 +++++++++
 src/protocols/ssh/user.h    |  9 +++++++--
 src/protocols/telnet/user.c | 10 ++++++++++
 src/protocols/telnet/user.h |  5 +++++
 6 files changed, 45 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/rdp/user.c
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/user.c b/src/protocols/rdp/user.c
index 6ded2eb..af597db 100644
--- a/src/protocols/rdp/user.c
+++ b/src/protocols/rdp/user.c
@@ -122,3 +122,12 @@ int guac_rdp_user_file_handler(guac_user* user, guac_stream* stream,
     return 0;
 }
 
+int guac_rdp_user_leave_handler(guac_user* user) {
+
+    guac_rdp_client* rdp_client = (guac_rdp_client*) user->client->data;
+
+    guac_common_cursor_remove_user(rdp_client->display->cursor, user);
+
+    return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/rdp/user.h
----------------------------------------------------------------------
diff --git a/src/protocols/rdp/user.h b/src/protocols/rdp/user.h
index fe94d3e..99b8c57 100644
--- a/src/protocols/rdp/user.h
+++ b/src/protocols/rdp/user.h
@@ -28,6 +28,11 @@
 guac_user_join_handler guac_rdp_user_join_handler;
 
 /**
+ * Handler for leaving users.
+ */
+guac_user_leave_handler guac_rdp_user_leave_handler;
+
+/**
  * Handler for received simple file uploads. This handler will automatically
  * select between RDPDR and SFTP depending on which is available and which has
  * priority given associated settings.

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/ssh/user.c
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/user.c b/src/protocols/ssh/user.c
index fc9913c..4a224a0 100644
--- a/src/protocols/ssh/user.c
+++ b/src/protocols/ssh/user.c
@@ -82,3 +82,12 @@ int guac_ssh_user_join_handler(guac_user* user, int argc, char** argv) {
 
 }
 
+int guac_ssh_user_leave_handler(guac_user* user) {
+
+    guac_ssh_client* ssh_client = (guac_ssh_client*) user->client->data;
+
+    guac_common_cursor_remove_user(ssh_client->term->cursor, user);
+
+    return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/ssh/user.h
----------------------------------------------------------------------
diff --git a/src/protocols/ssh/user.h b/src/protocols/ssh/user.h
index b9e9940..8287fed 100644
--- a/src/protocols/ssh/user.h
+++ b/src/protocols/ssh/user.h
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-#ifndef GUAC_VNC_USER_H
-#define GUAC_VNC_USER_H
+#ifndef GUAC_SSH_USER_H
+#define GUAC_SSH_USER_H
 
 #include "config.h"
 
@@ -29,5 +29,10 @@
  */
 guac_user_join_handler guac_ssh_user_join_handler;
 
+/**
+ * Handler for leaving users.
+ */
+guac_user_leave_handler guac_ssh_user_leave_handler;
+
 #endif
 

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/telnet/user.c
----------------------------------------------------------------------
diff --git a/src/protocols/telnet/user.c b/src/protocols/telnet/user.c
index 45855bd..427112b 100644
--- a/src/protocols/telnet/user.c
+++ b/src/protocols/telnet/user.c
@@ -78,3 +78,13 @@ int guac_telnet_user_join_handler(guac_user* user, int argc, char** argv) {
 
 }
 
+int guac_telnet_user_leave_handler(guac_user* user) {
+
+    guac_telnet_client* telnet_client =
+        (guac_telnet_client*) user->client->data;
+
+    guac_common_cursor_remove_user(telnet_client->term->cursor, user);
+
+    return 0;
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/82fd6a27/src/protocols/telnet/user.h
----------------------------------------------------------------------
diff --git a/src/protocols/telnet/user.h b/src/protocols/telnet/user.h
index 0968f67..910f0cb 100644
--- a/src/protocols/telnet/user.h
+++ b/src/protocols/telnet/user.h
@@ -29,5 +29,10 @@
  */
 guac_user_join_handler guac_telnet_user_join_handler;
 
+/**
+ * Handler for leaving users.
+ */
+guac_user_leave_handler guac_telnet_user_leave_handler;
+
 #endif