xrdp: fix for non 'new' cursor clients like rdesktop

This commit is contained in:
Jay Sorg 2013-05-20 11:50:05 -07:00
parent bc2c50602e
commit 2039bbe397
1 changed files with 7 additions and 5 deletions

View File

@ -428,17 +428,20 @@ libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
int data_bytes;
DEBUG(("libxrdp_send_pointer sending cursor"));
if (bpp == 0)
{
bpp = 24;
}
/* error check */
if ((session->client_info->pointer_flags & 1) == 0)
{
if (bpp != 0)
if (bpp != 24)
{
g_writeln("libxrdp_send_pointer: error");
return 1;
}
}
if ((bpp != 0) && (bpp == 15) && (bpp != 16) &&
(bpp != 24) && (bpp != 32))
if ((bpp == 15) && (bpp != 16) && (bpp != 24) && (bpp != 32))
{
g_writeln("libxrdp_send_pointer: error");
return 1;
@ -446,7 +449,7 @@ libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
make_stream(s);
init_stream(s, 8192);
xrdp_rdp_init_data((struct xrdp_rdp *)session->rdp, s);
if (bpp == 0)
if ((session->client_info->pointer_flags & 1) == 0)
{
out_uint16_le(s, RDP_POINTER_COLOR);
out_uint16_le(s, 0); /* pad */
@ -481,7 +484,6 @@ libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
}
}
break;
case 0:
case 24:
p = data;
for (i = 0; i < 32; i++)