libxrdp: xrdp_fastpath_recv cleanup
This commit is contained in:
parent
866fde498e
commit
75bff736a6
@ -59,33 +59,22 @@ xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s)
|
|||||||
int fp_hdr;
|
int fp_hdr;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
int byte;
|
int byte;
|
||||||
int hdr_len = 2; /* fastpath header length - can be 2 or 3 bytes long, depends on length */
|
|
||||||
DEBUG((" in xrdp_fastpath_recv"));
|
DEBUG((" in xrdp_fastpath_recv"));
|
||||||
|
|
||||||
in_uint8(s, fp_hdr); /* fpInputHeader (1 byte) */
|
in_uint8(s, fp_hdr); /* fpInputHeader (1 byte) */
|
||||||
g_writeln("xrdp_fastpath_recv: header= 0x%8.8x", fp_hdr);
|
|
||||||
|
|
||||||
self->numEvents = (fp_hdr & 0x3C) >> 2;
|
self->numEvents = (fp_hdr & 0x3C) >> 2;
|
||||||
self->secFlags = (fp_hdr & 0xC0) >> 6;
|
self->secFlags = (fp_hdr & 0xC0) >> 6;
|
||||||
|
|
||||||
// receive fastpath first length packet
|
in_uint8(s, byte); /* length 1 (1 byte) */
|
||||||
in_uint8(s, byte); /* length 1 */
|
|
||||||
|
|
||||||
if (byte & 0x80)
|
if (byte & 0x80)
|
||||||
{
|
{
|
||||||
byte &= ~(0x80);
|
byte &= ~(0x80);
|
||||||
len = (byte << 8);
|
len = (byte << 8);
|
||||||
// receive fastpath second length packet
|
in_uint8(s, byte); /* length 2 (1 byte) */
|
||||||
in_uint8(s, byte); /* length 2 */
|
|
||||||
hdr_len++;
|
|
||||||
len += byte;
|
len += byte;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
len = byte;
|
|
||||||
}
|
|
||||||
|
|
||||||
// g_writeln("len= %d , numEvents= %d, secFlags= %d, bytesleft: %d", len, self->numEvents, self->secFlags, (s->p - s->data));
|
|
||||||
|
|
||||||
DEBUG((" out xrdp_fastpath_recv"));
|
DEBUG((" out xrdp_fastpath_recv"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user