libxrdp: send, get, and use multi fragment max caps
This commit is contained in:
parent
6f63f93890
commit
630f735a28
@ -121,6 +121,8 @@ struct xrdp_client_info
|
|||||||
int mcs_connection_type;
|
int mcs_connection_type;
|
||||||
int mcs_early_capability_flags;
|
int mcs_early_capability_flags;
|
||||||
|
|
||||||
|
int max_fastpath_frag_bytes;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -455,6 +455,10 @@ static int APP_CC
|
|||||||
xrdp_caps_process_multifragmetupdate(struct xrdp_rdp *self, struct stream *s,
|
xrdp_caps_process_multifragmetupdate(struct xrdp_rdp *self, struct stream *s,
|
||||||
int len)
|
int len)
|
||||||
{
|
{
|
||||||
|
int MaxRequestSize;
|
||||||
|
|
||||||
|
in_uint32_le(s, MaxRequestSize);
|
||||||
|
self->client_info.max_fastpath_frag_bytes = MaxRequestSize;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,6 +825,14 @@ xrdp_caps_send_demand_active(struct xrdp_rdp *self)
|
|||||||
out_uint16_le(s, 5);
|
out_uint16_le(s, 5);
|
||||||
out_uint8(s, 0); /* client sets */
|
out_uint8(s, 0); /* client sets */
|
||||||
|
|
||||||
|
if (self->client_info.use_fast_path & 1) /* fastpath output on */
|
||||||
|
{
|
||||||
|
caps_count++;
|
||||||
|
out_uint16_le(s, 0x001A); /* 26 CAPSETTYPE_MULTIFRAGMENTUPDATE */
|
||||||
|
out_uint16_le(s, 8);
|
||||||
|
out_uint32_le(s, 3 * 1024 * 1024); /* 3MB */
|
||||||
|
}
|
||||||
|
|
||||||
out_uint8s(s, 4); /* pad */
|
out_uint8s(s, 4); /* pad */
|
||||||
|
|
||||||
s_mark_end(s);
|
s_mark_end(s);
|
||||||
|
@ -101,7 +101,14 @@ xrdp_fastpath_recv(struct xrdp_fastpath *self, struct stream *s)
|
|||||||
int APP_CC
|
int APP_CC
|
||||||
xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s)
|
xrdp_fastpath_init(struct xrdp_fastpath *self, struct stream *s)
|
||||||
{
|
{
|
||||||
init_stream(s, 32 * 1024);
|
int bytes;
|
||||||
|
|
||||||
|
bytes = self->session->client_info->max_fastpath_frag_bytes;
|
||||||
|
if (bytes < 32 * 1024)
|
||||||
|
{
|
||||||
|
bytes = 32 * 1024;
|
||||||
|
}
|
||||||
|
init_stream(s, bytes);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user