libfreerdp-core: split licensing/capability steps in server-side RDP state machine

This commit is contained in:
Marc-André Moreau 2013-07-17 17:46:58 -04:00
parent a55fbc7b68
commit 7e63668090
2 changed files with 9 additions and 2 deletions

View File

@ -768,10 +768,12 @@ BOOL rdp_server_accept_client_info(rdpRdp* rdp, wStream* s)
if (!rdp_recv_client_info(rdp, s))
return FALSE;
rdp->state = CONNECTION_STATE_LICENSE;
if (!license_send_valid_client_error_packet(rdp->license))
return FALSE;
rdp->state = CONNECTION_STATE_LICENSE;
rdp->state = CONNECTION_STATE_CAPABILITY;
return TRUE;
}
@ -798,7 +800,7 @@ BOOL rdp_server_reactivate(rdpRdp* rdp)
if (!rdp_send_deactivate_all(rdp))
return FALSE;
rdp->state = CONNECTION_STATE_LICENSE;
rdp->state = CONNECTION_STATE_CAPABILITY;
if (!rdp_send_demand_active(rdp))
return FALSE;

View File

@ -319,9 +319,14 @@ static int peer_recv_callback(rdpTransport* transport, wStream* s, void* extra)
if (!rdp_send_demand_active(rdp))
return -1;
break;
case CONNECTION_STATE_LICENSE:
/* TODO: we don't support licensing so nothing here */
break;
case CONNECTION_STATE_CAPABILITY:
if (!rdp_server_accept_confirm_active(rdp, s))
{
/**