mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: avoid reusing LoadBalanceInfo on reconnection
This commit is contained in:
parent
c2a59c23a7
commit
5b0822a437
|
@ -103,21 +103,30 @@ int rdp_redirection_apply_settings(rdpRdp* rdp)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (settings->RedirectionFlags & LB_TARGET_FQDN)
|
||||
{
|
||||
free(settings->RedirectionTargetFQDN);
|
||||
settings->RedirectionTargetFQDN = _strdup(redirection->TargetFQDN);
|
||||
}
|
||||
else if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
|
||||
{
|
||||
free(settings->TargetNetAddress);
|
||||
settings->TargetNetAddress = _strdup(redirection->TargetNetAddress);
|
||||
}
|
||||
else if (settings->RedirectionFlags & LB_TARGET_NETBIOS_NAME)
|
||||
{
|
||||
free(settings->RedirectionTargetNetBiosName);
|
||||
settings->RedirectionTargetNetBiosName = _strdup(redirection->TargetNetBiosName);
|
||||
}
|
||||
/**
|
||||
* Free previous LoadBalanceInfo, if any, otherwise it may end up
|
||||
* being reused for the redirected session, which is not what we want.
|
||||
*/
|
||||
|
||||
free(settings->LoadBalanceInfo);
|
||||
settings->LoadBalanceInfo = NULL;
|
||||
settings->LoadBalanceInfoLength = 0;
|
||||
}
|
||||
|
||||
if (settings->RedirectionFlags & LB_TARGET_FQDN)
|
||||
{
|
||||
free(settings->RedirectionTargetFQDN);
|
||||
settings->RedirectionTargetFQDN = _strdup(redirection->TargetFQDN);
|
||||
}
|
||||
else if (settings->RedirectionFlags & LB_TARGET_NET_ADDRESS)
|
||||
{
|
||||
free(settings->TargetNetAddress);
|
||||
settings->TargetNetAddress = _strdup(redirection->TargetNetAddress);
|
||||
}
|
||||
else if (settings->RedirectionFlags & LB_TARGET_NETBIOS_NAME)
|
||||
{
|
||||
free(settings->RedirectionTargetNetBiosName);
|
||||
settings->RedirectionTargetNetBiosName = _strdup(redirection->TargetNetBiosName);
|
||||
}
|
||||
|
||||
if (settings->RedirectionFlags & LB_USERNAME)
|
||||
|
|
Loading…
Reference in New Issue