diff options
author | speidy <speidy@gmail.com> | 2014-03-04 10:19:19 +0200 |
---|---|---|
committer | speidy <speidy@gmail.com> | 2014-03-04 10:19:19 +0200 |
commit | 43f4d439ec52616ccf6380374e21bce0b7087694 (patch) | |
tree | a1318234fd983d16265b77c8cafda13c4486b177 /libxrdp/xrdp_rdp.c | |
parent | 1f1e803140ea96b81ac4700a6759a9617d0f2fd2 (diff) | |
download | xrdp-proprietary-43f4d439ec52616ccf6380374e21bce0b7087694.tar.gz xrdp-proprietary-43f4d439ec52616ccf6380374e21bce0b7087694.zip |
libxrdp: work on fastpath, length issue
Diffstat (limited to 'libxrdp/xrdp_rdp.c')
-rw-r--r-- | libxrdp/xrdp_rdp.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 85ca15d7..ea2204f5 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -299,20 +299,30 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code) int len = 0; int pdu_code = 0; int chan = 0; + const tui8 *header; + header = (const tui8 *) (self->session->trans->in_s->p); DEBUG(("in xrdp_rdp_recv")); + /* not fastpath, do tpkt */ if (s->next_packet == 0 || s->next_packet >= s->end) { - chan = 0; - error = xrdp_sec_recv(self->sec_layer, s, &chan); + /* check for fastpath first */ + g_writeln("xrdp_rdp_recv: header= 0x%8.8x", header[0]); - if (error == 2) /* we have fastpath packet! */ + if ((header[0] & 0x3) == 0 && (header[0] != 0x3c)) { - *code = 2; + if (xrdp_sec_recv_fastpath(self->sec_layer, s) != 0) + { + return 1; + } + *code = 2; // special code for fastpath return 0; } + chan = 0; + error = xrdp_sec_recv(self->sec_layer, s, &chan); + if (error == -1) /* special code for send demand active */ { s->next_packet = 0; @@ -1691,8 +1701,8 @@ xrdp_rdp_process_fastpath_data_input(struct xrdp_rdp *self, struct stream *s) eventFlags = (eventHeader & 0x1F); eventCode = (eventHeader >> 5); - //g_writeln("eventCode= %d, eventFlags= %d, numEvents= %d", - // eventCode, eventFlags, self->sec_layer->fastpath_layer->numEvents); +// g_writeln("eventCode= %d, eventFlags= %d, numEvents= %d", +// eventCode, eventFlags, self->sec_layer->fastpath_layer->numEvents); switch (eventCode) { |