Merge pull request #4745 from akallabeth/redirect_fix_follow_up
Fixed channel reconnect after redirect.
This commit is contained in:
commit
7705535f90
@ -353,7 +353,7 @@ BOOL rdp_client_disconnect_and_clear(rdpRdp* rdp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL rdp_client_reconnect_channels(rdpRdp* rdp)
|
||||
static BOOL rdp_client_reconnect_channels(rdpRdp* rdp, BOOL redirect)
|
||||
{
|
||||
BOOL status;
|
||||
rdpContext* context;
|
||||
@ -370,6 +370,9 @@ static BOOL rdp_client_reconnect_channels(rdpRdp* rdp)
|
||||
|
||||
if (context->instance->ConnectionCallbackState == CLIENT_STATE_PRECONNECT_PASSED)
|
||||
{
|
||||
if (redirect)
|
||||
return TRUE;
|
||||
|
||||
if (!IFCALLRESULT(FALSE, context->instance->PostConnect, context->instance))
|
||||
return FALSE;
|
||||
|
||||
@ -456,7 +459,7 @@ BOOL rdp_client_redirect(rdpRdp* rdp)
|
||||
status = rdp_client_connect(rdp);
|
||||
|
||||
if (status)
|
||||
status = rdp_client_reconnect_channels(rdp);
|
||||
status = rdp_client_reconnect_channels(rdp, TRUE);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -479,7 +482,7 @@ BOOL rdp_client_reconnect(rdpRdp* rdp)
|
||||
status = rdp_client_connect(rdp);
|
||||
|
||||
if (status)
|
||||
status = rdp_client_reconnect_channels(rdp);
|
||||
status = rdp_client_reconnect_channels(rdp, FALSE);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
@ -218,6 +218,8 @@ BOOL freerdp_connect(freerdp* instance)
|
||||
{
|
||||
if (freerdp_get_last_error(instance->context) == FREERDP_ERROR_CONNECT_TRANSPORT_FAILED)
|
||||
status = freerdp_reconnect(instance);
|
||||
else
|
||||
goto freerdp_connect_finally;
|
||||
}
|
||||
|
||||
if (!status || (status2 != CHANNEL_RC_OK)
|
||||
|
Loading…
Reference in New Issue
Block a user