minor fastpath changes

ulab-next
Jay Sorg 11 years ago
parent 98c9b8b692
commit fe042b0c61

@ -206,7 +206,17 @@ libxrdp_process_data(struct xrdp_session *session, struct stream *s)
if (do_read) 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) if (s == 0)
{ {
g_writeln("libxrdp_process_data: libxrdp_force_read failed"); 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) if (cont)
{ {
cont = (s->next_packet != 0) && cont = (s->next_packet != 0) && (s->next_packet < s->end);
(s->next_packet < s->end);
} }
} }

@ -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) if (s->next_packet == 0 || s->next_packet >= s->end)
{ {
/* check for fastpath first */ /* 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 ((header[0] != 0x3) && (header[0] != 0x3c))
{ {
if (xrdp_sec_recv_fastpath(self->sec_layer, s) != 0) if (xrdp_sec_recv_fastpath(self->sec_layer, s) != 0)
{ {
return 1; return 1;
} }
s->next_packet = 0;
*code = 2; // special code for fastpath input *code = 2; // special code for fastpath input
DEBUG(("out (fastpath) xrdp_rdp_recv")); DEBUG(("out (fastpath) xrdp_rdp_recv"));
return 0; return 0;
@ -387,6 +388,7 @@ xrdp_rdp_recv(struct xrdp_rdp *self, struct stream *s, int *code)
return 0; return 0;
} }
} }
/*****************************************************************************/ /*****************************************************************************/
int APP_CC int APP_CC
xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type) xrdp_rdp_send(struct xrdp_rdp *self, struct stream *s, int pdu_type)

Loading…
Cancel
Save