libfreerdp-core: fix encoding of share control header
This commit is contained in:
parent
66ddfd5a60
commit
815c99916a
@ -97,17 +97,17 @@ boolean rdp_client_connect(rdpRdp* rdp)
|
|||||||
|
|
||||||
rdp_send_client_synchronize_pdu(rdp);
|
rdp_send_client_synchronize_pdu(rdp);
|
||||||
rdp_send_client_cooperate_pdu(rdp);
|
rdp_send_client_cooperate_pdu(rdp);
|
||||||
|
rdp_recv(rdp); /* synchronize */
|
||||||
|
rdp_recv(rdp); /* cooperate */
|
||||||
|
|
||||||
rdp_recv(rdp);
|
rdp_send_client_request_control_pdu(rdp);
|
||||||
rdp_recv(rdp);
|
rdp_recv(rdp); /* request control */
|
||||||
rdp_recv(rdp);
|
|
||||||
|
|
||||||
rdp_recv(rdp);
|
|
||||||
|
|
||||||
//rdp_send_client_request_control_pdu(rdp);
|
|
||||||
//rdp_send_client_persistent_key_list_pdu(rdp);
|
//rdp_send_client_persistent_key_list_pdu(rdp);
|
||||||
//rdp_send_client_font_list_pdu(rdp);
|
//rdp_send_client_font_list_pdu(rdp);
|
||||||
|
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ void rdp_write_share_control_header(STREAM* s, uint16 length, uint16 type, uint1
|
|||||||
{
|
{
|
||||||
/* Share Control Header */
|
/* Share Control Header */
|
||||||
stream_write_uint16(s, length); /* totalLength */
|
stream_write_uint16(s, length); /* totalLength */
|
||||||
stream_write_uint16(s, type); /* pduType */
|
stream_write_uint16(s, type | 0x10); /* pduType */
|
||||||
stream_write_uint16(s, channel_id); /* pduSource */
|
stream_write_uint16(s, channel_id); /* pduSource */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,8 @@ void rdp_write_share_data_header(STREAM* s, uint16 length, uint8 type, uint32 sh
|
|||||||
stream_write_uint8(s, STREAM_LOW); /* streamId (1 byte) */
|
stream_write_uint8(s, STREAM_LOW); /* streamId (1 byte) */
|
||||||
stream_write_uint16(s, length); /* uncompressedLength (2 bytes) */
|
stream_write_uint16(s, length); /* uncompressedLength (2 bytes) */
|
||||||
stream_write_uint8(s, type); /* pduType2, Data PDU Type (1 byte) */
|
stream_write_uint8(s, type); /* pduType2, Data PDU Type (1 byte) */
|
||||||
stream_write_uint16(s, length); /* compressedLength (2 byte2) */
|
stream_write_uint8(s, 0); /* compressedType (1 byte) */
|
||||||
|
stream_write_uint16(s, 0); /* compressedLength (2 bytes) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,7 +163,7 @@ void rdp_send_pdu(rdpRdp* rdp, STREAM* s, uint16 type, uint16 channel_id)
|
|||||||
stream_set_pos(s, 0);
|
stream_set_pos(s, 0);
|
||||||
|
|
||||||
rdp_write_header(rdp, s, length);
|
rdp_write_header(rdp, s, length);
|
||||||
rdp_write_share_control_header(s, length, PDU_TYPE_DATA, channel_id);
|
rdp_write_share_control_header(s, length, type, channel_id);
|
||||||
|
|
||||||
stream_set_pos(s, length);
|
stream_set_pos(s, length);
|
||||||
transport_write(rdp->transport, s);
|
transport_write(rdp->transport, s);
|
||||||
|
Loading…
Reference in New Issue
Block a user