set use_cache_glyph_v2 on if the client support

This commit is contained in:
daixj
2018-10-25 17:02:43 +08:00
parent 8da22cf67a
commit bc150c2e56
3 changed files with 3 additions and 9 deletions
+3 -3
View File
@@ -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);