Use g_redirect flag when creating a logon packet and clear

the flag when finished.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1771 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Henrik Andersson 2013-12-04 11:52:33 +00:00
parent 48f661b1b0
commit 8c5d480bf3

8
rdp.c
View File

@ -379,7 +379,7 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
DEBUG_RDP5(("Sending RDP5-style Logon packet\n"));
if (g_redirect_cookie_len > 0)
if (g_redirect == True && g_redirect_cookie_len > 0)
{
len_password = g_redirect_cookie_len;
len_password -= 2; /* substract 2 bytes which is added below */
@ -444,7 +444,7 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
if (0 < len_password)
{
if (0 < g_redirect_cookie_len)
if (g_redirect == True && 0 < g_redirect_cookie_len)
{
out_uint8p(s, g_redirect_cookie, g_redirect_cookie_len);
}
@ -514,6 +514,10 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
}
s_mark_end(s);
/* clear the redirect flag */
g_redirect = False;
sec_send(s, sec_flags);
}