diff options
| author | speidy <speidy@gmail.com> | 2014-03-15 16:10:20 +0200 |
|---|---|---|
| committer | speidy <speidy@gmail.com> | 2014-03-15 16:10:20 +0200 |
| commit | 53df4335eb3c02d07ffe1dc5a714263c49040a80 (patch) | |
| tree | 86e317ac5ebf6c707f51b1c8d39ac6e3e69efbd4 /libxrdp/xrdp_rdp.c | |
| parent | f66c5911a2ae57368e571643750c0b79aec5498f (diff) | |
| download | xrdp-proprietary-53df4335eb3c02d07ffe1dc5a714263c49040a80.tar.gz xrdp-proprietary-53df4335eb3c02d07ffe1dc5a714263c49040a80.zip | |
o added fastpath output, syncronize update pdu
o refactor caps a bit
Diffstat (limited to 'libxrdp/xrdp_rdp.c')
| -rw-r--r-- | libxrdp/xrdp_rdp.c | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index 8e778520..76834591 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -629,24 +629,47 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self) init_stream(s, 8192); DEBUG(("in xrdp_rdp_send_data_update_sync")); - if (xrdp_rdp_init_data(self, s) != 0) + if (self->client_info.use_fast_path & 1) /* fastpath output supported */ { - DEBUG(("out xrdp_rdp_send_data_update_sync error")); - free_stream(s); - return 1; + LLOGLN(10, ("xrdp_rdp_send_data_update_sync: fastpath")); + if (xrdp_rdp_init_fastpath(self, s) != 0) + { + return 1; + } + } + else /* slowpath */ + { + if (xrdp_rdp_init_data(self, s) != 0) + { + DEBUG(("out xrdp_rdp_send_data_update_sync error")); + free_stream(s); + return 1; + } + out_uint16_le(s, RDP_UPDATE_SYNCHRONIZE); } - out_uint16_le(s, RDP_UPDATE_SYNCHRONIZE); - out_uint8s(s, 2); + out_uint16_le(s, 0); /* pad */ s_mark_end(s); - if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_UPDATE) != 0) + if (self->client_info.use_fast_path & 1) /* fastpath output supported */ { - DEBUG(("out xrdp_rdp_send_data_update_sync error")); - free_stream(s); - return 1; + if (xrdp_rdp_send_fastpath(self, s, + FASTPATH_UPDATETYPE_SYNCHRONIZE) != 0) + { + return 1; + } + } + else /* slowpath */ + { + if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_UPDATE) != 0) + { + DEBUG(("out xrdp_rdp_send_data_update_sync error")); + free_stream(s); + return 1; + } } + DEBUG(("out xrdp_rdp_send_data_update_sync")); free_stream(s); return 0; @@ -748,8 +771,8 @@ xrdp_rdp_send_synchronise(struct xrdp_rdp *self) return 1; } - out_uint16_le(s, 1); - out_uint16_le(s, 1002); + out_uint16_le(s, 1); /* messageType (2 bytes) */ + out_uint16_le(s, 1002); /* targetUser (2 bytes) */ s_mark_end(s); if (xrdp_rdp_send_data(self, s, RDP_DATA_PDU_SYNCHRONISE) != 0) |
