summaryrefslogtreecommitdiffstats
path: root/sesman/libscp/libscp_v0.c
diff options
context:
space:
mode:
authorLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-03-08 16:41:37 -0800
committerLaxmikant Rashinkar <LK.Rashinkar@gmail.com>2014-03-08 16:41:37 -0800
commit883650700fcd9e0bb90de5c307e7e4e845725312 (patch)
tree655e1121772e2f01b4e052e7282ce50f3b70d85c /sesman/libscp/libscp_v0.c
parent4f83a979eba76f90da33d2936ac15be744b57ef8 (diff)
downloadxrdp-proprietary-883650700fcd9e0bb90de5c307e7e4e845725312.tar.gz
xrdp-proprietary-883650700fcd9e0bb90de5c307e7e4e845725312.zip
added support for using Xorg driver model
Diffstat (limited to 'sesman/libscp/libscp_v0.c')
-rw-r--r--sesman/libscp/libscp_v0.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sesman/libscp/libscp_v0.c b/sesman/libscp/libscp_v0.c
index afa09bd8..eab616ff 100644
--- a/sesman/libscp/libscp_v0.c
+++ b/sesman/libscp/libscp_v0.c
@@ -56,6 +56,10 @@ scp_v0c_connect(struct SCP_CONNECTION *c, struct SCP_SESSION *s)
{
out_uint16_be(c->out_s, 10);
}
+ else if (s->type == SCP_SESSION_TYPE_XORG)
+ {
+ out_uint16_be(c->out_s, 20);
+ }
else
{
log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: network error", __LINE__);
@@ -191,7 +195,7 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
in_uint16_be(c->in_s, code);
- if (code == 0 || code == 10)
+ if (code == 0 || code == 10 || code == 20)
{
session = scp_session_create();
@@ -207,10 +211,20 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
{
scp_session_set_type(session, SCP_SESSION_TYPE_XVNC);
}
- else
+ else if (code == 10)
{
scp_session_set_type(session, SCP_SESSION_TYPE_XRDP);
}
+ else if (code == 20)
+ {
+ scp_session_set_type(session, SCP_SESSION_TYPE_XORG);
+ }
+ else
+ {
+ log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: "
+ "invalid code in xrdp.ini file: code=%d", __LINE__, code);
+ return SCP_SERVER_STATE_INTERNAL_ERR;
+ }
/* reading username */
in_uint16_be(c->in_s, sz);