From bc150c2e56245ec3637d59915600fc65bc3c83a7 Mon Sep 17 00:00:00 2001 From: daixj Date: Thu, 25 Oct 2018 17:02:43 +0800 Subject: [PATCH] set use_cache_glyph_v2 on if the client support --- libxrdp/xrdp_caps.c | 6 +++--- libxrdp/xrdp_rdp.c | 4 ---- xrdp/xrdp.ini.in | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/libxrdp/xrdp_caps.c b/libxrdp/xrdp_caps.c index 46810c18..ff9b4484 100644 --- a/libxrdp/xrdp_caps.c +++ b/libxrdp/xrdp_caps.c @@ -367,7 +367,7 @@ xrdp_caps_process_glyphcache(struct xrdp_rdp *self, struct stream *s, { int glyph_support_level; - if (len < 40 + 4 + 2 + 2) + if (len < 40 + 4 + 2 + 2) /* MS-RDPBCGR 2.2.7.1.8 */ { g_writeln("xrdp_caps_process_glyphcache: error"); return 1; @@ -378,9 +378,9 @@ xrdp_caps_process_glyphcache(struct xrdp_rdp *self, struct stream *s, in_uint16_le(s, glyph_support_level); in_uint8s(s, 2); /* pad */ - if (self->client_info.use_cache_glyph_v2 && (glyph_support_level != 3)) + if (glyph_support_level == GLYPH_SUPPORT_ENCODE) { - self->client_info.use_cache_glyph_v2 = 0; + self->client_info.use_cache_glyph_v2 = 1; } g_writeln("xrdp_caps_process_glyphcache: support level %d ", glyph_support_level); diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 928c1610..ff099da9 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -275,10 +275,6 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info) client_info->key_file, g_get_strerror()); } } - else if (g_strcasecmp(item, "use_cache_glyph_v2") == 0) - { - client_info->use_cache_glyph_v2 = g_text2bool(value); - } } diff --git a/xrdp/xrdp.ini.in b/xrdp/xrdp.ini.in index 0b24012d..c73e271c 100644 --- a/xrdp/xrdp.ini.in +++ b/xrdp/xrdp.ini.in @@ -53,8 +53,6 @@ use_fastpath=both #require_credentials=true ; You can set the PAM error text in a gateway setup (MAX 256 chars) #pamerrortxt=change your password according to policy at http://url -; Cache Glyph Revison 2. default: false -use_cache_glyph_v2=true ; ; colors used by windows in RGB format