int rdp_client_connect_finalize(rdpRdp* rdp) { /** * [MS-RDPBCGR] 1.3.1.1 - 8. * The client-to-server PDUs sent during this phase have no dependencies on any of the server-to- * client PDUs; they may be sent as a single batch, provided that sequencing is maintained. */ if (!rdp_send_client_synchronize_pdu(rdp)) return -1; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_COOPERATE)) return -1; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_REQUEST_CONTROL)) return -1; /** * [MS-RDPBCGR] 2.2.1.17 * Client persistent key list must be sent if a bitmap is * stored in persistent bitmap cache or the server has advertised support for bitmap * host cache and a deactivation reactivation sequence is *not* in progress. */ if (!rdp->deactivation_reactivation && rdp->settings->BitmapCachePersistEnabled) { if (!rdp_send_client_persistent_key_list_pdu(rdp)) return -1; } if (!rdp_send_client_font_list_pdu(rdp, FONTLIST_FIRST | FONTLIST_LAST)) return -1; return 0; }
boolean rdp_client_connect_demand_active(rdpRdp* rdp, STREAM* s) { uint8* mark; uint16 width; uint16 height; width = rdp->settings->width; height = rdp->settings->height; stream_get_mark(s, mark); if (!rdp_recv_demand_active(rdp, s)) { stream_set_mark(s, mark); stream_seek(s, RDP_PACKET_HEADER_LENGTH); if (rdp_recv_out_of_sequence_pdu(rdp, s) != True) return False; return True; } if (!rdp_send_confirm_active(rdp)) return False; /** * The server may request a different desktop size during Deactivation-Reactivation sequence. * In this case, the UI should be informed and do actual window resizing at this point. */ if (width != rdp->settings->width || height != rdp->settings->height) { IFCALL(rdp->update->DesktopResize, rdp->update); } /** * [MS-RDPBCGR] 1.3.1.1 - 8. * The client-to-server PDUs sent during this phase have no dependencies on any of the server-to- * client PDUs; they may be sent as a single batch, provided that sequencing is maintained. */ if (!rdp_send_client_synchronize_pdu(rdp)) return False; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_COOPERATE)) return False; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_REQUEST_CONTROL)) return False; if (!rdp_send_client_persistent_key_list_pdu(rdp)) return False; if (!rdp_send_client_font_list_pdu(rdp, FONTLIST_FIRST | FONTLIST_LAST)) return False; rdp->state = CONNECTION_STATE_ACTIVE; update_reset_state(rdp->update); return True; }
boolean rdp_client_connect_finalize(rdpRdp* rdp) { /** * [MS-RDPBCGR] 1.3.1.1 - 8. * The client-to-server PDUs sent during this phase have no dependencies on any of the server-to- * client PDUs; they may be sent as a single batch, provided that sequencing is maintained. */ if (!rdp_send_client_synchronize_pdu(rdp)) return false; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_COOPERATE)) return false; if (!rdp_send_client_control_pdu(rdp, CTRLACTION_REQUEST_CONTROL)) return false; if (!rdp_send_client_persistent_key_list_pdu(rdp)) return false; if (!rdp_send_client_font_list_pdu(rdp, FONTLIST_FIRST | FONTLIST_LAST)) return false; return true; }
void rdp_recv_demand_active(rdpRdp* rdp, STREAM* s, rdpSettings* settings) { rdp_read_demand_active(s, settings); rdp_send_confirm_active(rdp); rdp_send_client_synchronize_pdu(rdp); }