summaryrefslogtreecommitdiffstats
path: root/libxrdp
diff options
context:
space:
mode:
authorspeidy <speidy@gmail.com>2013-10-09 23:06:45 +0300
committerspeidy <speidy@gmail.com>2013-10-09 23:06:45 +0300
commita4d2917a0a169c0672dc61be4f7b4689a02278b3 (patch)
treee3e73aa6ee6e5b00d5f1d042277798ec0cca0387 /libxrdp
parentc2e7da84d416000a0b08ee561498044196437462 (diff)
downloadxrdp-proprietary-a4d2917a0a169c0672dc61be4f7b4689a02278b3.tar.gz
xrdp-proprietary-a4d2917a0a169c0672dc61be4f7b4689a02278b3.zip
libxrdp: iso_send_rdpnegrdp fix + notes.
Diffstat (limited to 'libxrdp')
-rw-r--r--libxrdp/xrdp_iso.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c
index 04e19983..e77f5316 100644
--- a/libxrdp/xrdp_iso.c
+++ b/libxrdp/xrdp_iso.c
@@ -176,24 +176,18 @@ xrdp_iso_send_rdpnegrsp(struct xrdp_iso *self, struct stream *s, int code)
return 1;
}
- //check for RDPNEGDATA
- send_rdpnegdata = 1;
- if (self->selectedProtocol == -1) {
- send_rdpnegdata = 0;
- }
-
/* TPKT HEADER - 4 bytes */
out_uint8(s, 3); /* version */
out_uint8(s, 0); /* RESERVED */
- if (send_rdpnegdata == 1) {
- out_uint16_be(s, 19); /* length */
+ if (self->selectedProtocol != -1) {
+ out_uint16_be(s, 19); /* length */ //rdp negotiation happens.
}
else
{
- out_uint16_be(s, 11); /* length */
+ out_uint16_be(s, 11); /* length */ //rdp negotiation doesn't happen.
}
/* ISO LAYER - X.224 - 7 bytes*/
- if (send_rdpnegdata == 1) {
+ if (self->selectedProtocol != -1) {
out_uint8(s, 14); /* length */
}
else
@@ -204,7 +198,7 @@ xrdp_iso_send_rdpnegrsp(struct xrdp_iso *self, struct stream *s, int code)
out_uint16_be(s, 0);
out_uint16_be(s, 0x1234);
out_uint8(s, 0);
- if (send_rdpnegdata == 1) {
+ if (self->selectedProtocol != -1) {
/* RDP_NEG_RSP - 8 bytes*/
out_uint8(s, RDP_NEG_RSP);
out_uint8(s, EXTENDED_CLIENT_DATA_SUPPORTED); /* flags */