summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_rdp.c
diff options
context:
space:
mode:
authorIdan Freiberg <speidy@gmail.com>2017-01-23 08:15:18 +0200
committerGitHub <noreply@github.com>2017-01-23 08:15:18 +0200
commit482671fd187fa6652b45a43fa8aab2778b69f6e2 (patch)
tree52e79108109fe0bacef94b9fadef594fda3e62e2 /libxrdp/xrdp_rdp.c
parente217e68acbdb4bcb49591402be5d3f0efc76846a (diff)
parentb7da395b5e46eab4b333d53e66e7f5da61a3dc11 (diff)
downloadxrdp-proprietary-482671fd187fa6652b45a43fa8aab2778b69f6e2.tar.gz
xrdp-proprietary-482671fd187fa6652b45a43fa8aab2778b69f6e2.zip
Merge pull request #625 from speidy/proxy_session_info
Pass session info in proxy mode
Diffstat (limited to 'libxrdp/xrdp_rdp.c')
-rw-r--r--libxrdp/xrdp_rdp.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index ca82df70..5159ba5b 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -1275,3 +1275,43 @@ xrdp_rdp_send_deactivate(struct xrdp_rdp *self)
DEBUG(("out xrdp_rdp_send_deactivate"));
return 0;
}
+
+/*****************************************************************************/
+int APP_CC
+xrdp_rdp_send_session_info(struct xrdp_rdp *self, const char *data,
+ int data_bytes)
+{
+ struct stream *s;
+
+ LLOGLN(0, ("xrdp_rdp_send_session_info: data_bytes %d", data_bytes));
+ make_stream(s);
+ init_stream(s, 8192);
+
+ if (xrdp_rdp_init_data(self, s) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+
+ if (s_check_rem_out(s, data_bytes))
+ {
+ out_uint8a(s, data, data_bytes);
+ }
+ else
+ {
+ free_stream(s);
+ return 1;
+ }
+
+ s_mark_end(s);
+
+ if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_LOGON) != 0)
+ {
+ free_stream(s);
+ return 1;
+ }
+
+ free_stream(s);
+ return 0;
+}
+