Regression fix: session matching uses wrong bpp for Xorg

The removal of "xserverbpp=24" from the Xorg entry lead to a regression.
Clients with a different bpp would not reconnect to an xorgxrdp session
if the client's bpp is different, even though xorgxrdp is always using 24
bpp.

Imply "xserverbpp=24" for "code=20" in xrdp.ini.
This commit is contained in:
Pavel Roskin 2016-12-15 23:10:57 -08:00
parent 9584e22ba6
commit 0c6b5111af

View File

@ -229,14 +229,19 @@ xrdp_mm_send_login(struct xrdp_mm *self)
out_uint16_be(s, self->wm->screen->width);
out_uint16_be(s, self->wm->screen->height);
if (xserverbpp > 0)
/* select and send X server bpp */
if (xserverbpp == 0)
{
out_uint16_be(s, xserverbpp);
}
else
{
out_uint16_be(s, self->wm->screen->bpp);
if (self->code == 20)
{
xserverbpp = 24; /* xorgxrdp is always at 24 bpp */
}
else
{
xserverbpp = self->wm->screen->bpp; /* use client's bpp */
}
}
out_uint16_be(s, xserverbpp);
/* send domain */
if(self->wm->client_info->domain[0]!='_')