diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2014-03-05 12:38:17 -0800 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2014-03-05 12:38:17 -0800 |
commit | fe042b0c61db1a06078800079bb7ea4cc50146e3 (patch) | |
tree | 61e4156a25f96c5181c9367e9407f8d1b39f4ee5 /libxrdp | |
parent | 98c9b8b692999a37e06e5d20349a49e1d99ca981 (diff) | |
download | xrdp-proprietary-fe042b0c61db1a06078800079bb7ea4cc50146e3.tar.gz xrdp-proprietary-fe042b0c61db1a06078800079bb7ea4cc50146e3.zip |
minor fastpath changes
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/libxrdp.c | 15 | ||||
-rw-r--r-- | libxrdp/xrdp_rdp.c | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/libxrdp/libxrdp.c b/libxrdp/libxrdp.c index ea1e7f25..85d5312e 100644 --- a/libxrdp/libxrdp.c +++ b/libxrdp/libxrdp.c @@ -206,7 +206,17 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s) if (do_read) { - s = libxrdp_force_read(session->trans); + if (s == 0) + { + s = libxrdp_force_read(session->trans); + } + else + { + if ((s->next_packet == 0) || (s->next_packet >= s->end)) + { + s = libxrdp_force_read(session->trans); + } + } if (s == 0) { g_writeln("libxrdp_process_data: libxrdp_force_read failed"); @@ -281,8 +291,7 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s) if (cont) { - cont = (s->next_packet != 0) && - (s->next_packet < s->end); + cont = (s->next_packet != 0) && (s->next_packet < s->end); } } diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 729a2f29..ccc4f8b5 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -304,13 +304,14 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code) if (s->next_packet == 0 || s->next_packet >= s->end) { /* check for fastpath first */ - header = (const tui8 *) (self->session->trans->in_s->p); + header = (const tui8 *) (s->p); if ((header[0] != 0x3) && (header[0] != 0x3c)) { if (xrdp_sec_recv_fastpath(self->sec_layer, s) != 0) { return 1; } + s->next_packet = 0; *code = 2; // special code for fastpath input DEBUG(("out (fastpath) xrdp_rdp_recv")); return 0; @@ -387,6 +388,7 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code) return 0; } } + /*****************************************************************************/ int APP_CC xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type) |