libfreerdp-core: initial server redirection support

This commit is contained in:
Marc-André Moreau 2011-09-03 17:02:26 -04:00
parent d7917f9db5
commit e4c7662148
3 changed files with 12 additions and 3 deletions

View File

@ -116,6 +116,13 @@ boolean rdp_client_redirect(rdpRdp* rdp)
rdp_client_disconnect(rdp);
mcs_free(rdp->mcs);
nego_free(rdp->nego);
transport_free(rdp->transport);
rdp->transport = transport_new(settings);
rdp->nego = nego_new(rdp->transport);
rdp->mcs = mcs_new(rdp->transport);
rdp->transport->layer = TRANSPORT_LAYER_TCP;
settings->redirected_session_id = redirection->sessionID;

View File

@ -143,9 +143,10 @@ boolean rdp_recv_server_redirection_pdu(rdpRdp* rdp, STREAM* s)
stream_seek(s, 8); /* pad (8 bytes) */
rdp_client_redirect(rdp);
return True;
if (redirection->flags & LB_NOREDIRECT)
return True;
else
return rdp_client_redirect(rdp);
}
boolean rdp_recv_redirection_packet(rdpRdp* rdp, STREAM* s)

View File

@ -289,6 +289,7 @@ int transport_check_fds(rdpTransport* transport)
wait_obj_clear(transport->recv_event);
status = transport_read_nonblocking(transport);
if (status < 0)
return status;