libfreerdp-core:transport: fix nonblocking fregmented packet receiving.

This commit is contained in:
Vic Lee
2011-08-08 14:54:46 +08:00
parent f104b0ca92
commit 9d12c25fd3

View File

@@ -126,9 +126,9 @@ int transport_read(rdpTransport* transport, STREAM* s)
while (True)
{
if (transport->layer == TRANSPORT_LAYER_TLS)
status = tls_read(transport->tls, s->data, s->size);
status = tls_read(transport->tls, stream_get_tail(s), stream_get_left(s));
else if (transport->layer == TRANSPORT_LAYER_TCP)
status = tcp_read(transport->tcp, s->data, s->size);
status = tcp_read(transport->tcp, stream_get_tail(s), stream_get_left(s));
if (status == 0 && transport->blocking)
{
@@ -239,7 +239,8 @@ int transport_check_fds(rdpTransport* transport)
if (length == 0)
{
printf("transport_check_fds: protocol error, not a TPKT header (%d).\n", header);
printf("transport_check_fds: protocol error, not a TPKT or Fast Path header.\n");
freerdp_hexdump(stream_get_head(transport->recv_buffer), pos);
return -1;
}