20 |
|
|
21 |
#include "rdesktop.h" |
#include "rdesktop.h" |
22 |
|
|
23 |
uint16 mcs_userid; |
uint16 g_mcs_userid; |
24 |
extern BOOL use_rdp5; |
extern BOOL use_rdp5; |
25 |
|
|
26 |
/* Parse an ASN.1 BER header */ |
/* Parse an ASN.1 BER header */ |
177 |
/* |
/* |
178 |
if (length > mcs_data->size) |
if (length > mcs_data->size) |
179 |
{ |
{ |
180 |
error("MCS data length %d, expected %d\n", length, |
error("MCS data length %d, expected %d\n", length, |
181 |
mcs_data->size); |
mcs_data->size); |
182 |
length = mcs_data->size; |
length = mcs_data->size; |
183 |
} |
} |
259 |
s = iso_init(5); |
s = iso_init(5); |
260 |
|
|
261 |
out_uint8(s, (MCS_CJRQ << 2)); |
out_uint8(s, (MCS_CJRQ << 2)); |
262 |
out_uint16_be(s, mcs_userid); |
out_uint16_be(s, g_mcs_userid); |
263 |
out_uint16_be(s, chanid); |
out_uint16_be(s, chanid); |
264 |
|
|
265 |
s_mark_end(s); |
s_mark_end(s); |
321 |
length |= 0x8000; |
length |= 0x8000; |
322 |
|
|
323 |
out_uint8(s, (MCS_SDRQ << 2)); |
out_uint8(s, (MCS_SDRQ << 2)); |
324 |
out_uint16_be(s, mcs_userid); |
out_uint16_be(s, g_mcs_userid); |
325 |
out_uint16_be(s, MCS_GLOBAL_CHANNEL); |
out_uint16_be(s, MCS_GLOBAL_CHANNEL); |
326 |
out_uint8(s, 0x70); /* flags */ |
out_uint8(s, 0x70); /* flags */ |
327 |
out_uint16_be(s, length); |
out_uint16_be(s, length); |
375 |
mcs_send_edrq(); |
mcs_send_edrq(); |
376 |
|
|
377 |
mcs_send_aurq(); |
mcs_send_aurq(); |
378 |
if (!mcs_recv_aucf(&mcs_userid)) |
if (!mcs_recv_aucf(&g_mcs_userid)) |
379 |
goto error; |
goto error; |
380 |
|
|
381 |
mcs_send_cjrq(mcs_userid + 1001); |
mcs_send_cjrq(g_mcs_userid + 1001); |
382 |
if (!mcs_recv_cjcf()) |
if (!mcs_recv_cjcf()) |
383 |
goto error; |
goto error; |
384 |
|
|
388 |
|
|
389 |
if (use_rdp5) |
if (use_rdp5) |
390 |
{ |
{ |
391 |
/* Note: If we send this cjrq after telling the server we support RDP4 only, |
/* Note: If we send this cjrq after telling the server we support RDP4 only, |
392 |
the server won't respond with a cjcf and we will hang. */ |
the server won't respond with a cjcf and we will hang. */ |
393 |
mcs_send_cjrq(MCS_GLOBAL_CHANNEL + 1); /* hack - clipboard */ |
mcs_send_cjrq(MCS_GLOBAL_CHANNEL + 1); /* hack - clipboard */ |
394 |
if (!mcs_recv_cjcf()) |
if (!mcs_recv_cjcf()) |