Only try to use automatic reconnect if we have earlier recieved the
reconnect random. It seems to work anyway, but let's take care. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1541 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
46499078e1
commit
0983e771c8
@ -105,6 +105,7 @@ uint32 g_redirect_flags = 0;
|
|||||||
|
|
||||||
uint32 g_reconnect_logonid = 0;
|
uint32 g_reconnect_logonid = 0;
|
||||||
char g_reconnect_random[16];
|
char g_reconnect_random[16];
|
||||||
|
RD_BOOL g_has_reconnect_random = False;
|
||||||
uint8 g_client_random[SEC_RANDOM_SIZE];
|
uint8 g_client_random[SEC_RANDOM_SIZE];
|
||||||
|
|
||||||
#ifdef WITH_RDPSND
|
#ifdef WITH_RDPSND
|
||||||
|
10
rdp.c
10
rdp.c
@ -70,6 +70,7 @@ extern uint32 g_redirect_flags;
|
|||||||
|
|
||||||
extern uint32 g_reconnect_logonid;
|
extern uint32 g_reconnect_logonid;
|
||||||
extern char g_reconnect_random[16];
|
extern char g_reconnect_random[16];
|
||||||
|
extern RD_BOOL g_has_reconnect_random;
|
||||||
extern uint8 g_client_random[SEC_RANDOM_SIZE];
|
extern uint8 g_client_random[SEC_RANDOM_SIZE];
|
||||||
|
|
||||||
#if WITH_DEBUG
|
#if WITH_DEBUG
|
||||||
@ -464,6 +465,8 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
|
|||||||
out_uint32_le(s, g_rdp5_performanceflags);
|
out_uint32_le(s, g_rdp5_performanceflags);
|
||||||
|
|
||||||
/* Client Auto-Reconnect */
|
/* Client Auto-Reconnect */
|
||||||
|
if (g_has_reconnect_random)
|
||||||
|
{
|
||||||
out_uint16_le(s, 28); /* cbAutoReconnectLen */
|
out_uint16_le(s, 28); /* cbAutoReconnectLen */
|
||||||
/* ARC_CS_PRIVATE_PACKET */
|
/* ARC_CS_PRIVATE_PACKET */
|
||||||
out_uint32_le(s, 28); /* cbLen */
|
out_uint32_le(s, 28); /* cbLen */
|
||||||
@ -473,6 +476,12 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
|
|||||||
g_client_random, SEC_RANDOM_SIZE, security_verifier);
|
g_client_random, SEC_RANDOM_SIZE, security_verifier);
|
||||||
out_uint8a(s, security_verifier, sizeof(security_verifier));
|
out_uint8a(s, security_verifier, sizeof(security_verifier));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out_uint16_le(s, 0); /* cbAutoReconnectLen */
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
s_mark_end(s);
|
s_mark_end(s);
|
||||||
sec_send(s, sec_flags);
|
sec_send(s, sec_flags);
|
||||||
}
|
}
|
||||||
@ -1357,6 +1366,7 @@ process_pdu_logon(STREAM s)
|
|||||||
|
|
||||||
in_uint32_le(s, g_reconnect_logonid);
|
in_uint32_le(s, g_reconnect_logonid);
|
||||||
in_uint8a(s, g_reconnect_random, 16);
|
in_uint8a(s, g_reconnect_random, 16);
|
||||||
|
g_has_reconnect_random = True;
|
||||||
DEBUG(("Saving auto-reconnect cookie, id=%u\n", g_reconnect_logonid));
|
DEBUG(("Saving auto-reconnect cookie, id=%u\n", g_reconnect_logonid));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user