Remove unnecessary variable to keep track of nlaFailure, instead just set the NLA authentication error in the callback
where it is detected.
This commit is contained in:
parent
be47c6f782
commit
ee3b39d70f
@ -299,16 +299,8 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
{
|
||||
if (rdp_check_fds(rdp) < 0)
|
||||
{
|
||||
if (rdp->transport->nlaFailure == TRUE)
|
||||
{
|
||||
if (!freerdp_get_last_error(rdp->context))
|
||||
freerdp_set_last_error(rdp->context, FREERDP_ERROR_AUTHENTICATION_FAILED);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!freerdp_get_last_error(rdp->context))
|
||||
freerdp_set_last_error(rdp->context, FREERDP_ERROR_CONNECT_TRANSPORT_FAILED);
|
||||
}
|
||||
if (!freerdp_get_last_error(rdp->context))
|
||||
freerdp_set_last_error(rdp->context, FREERDP_ERROR_CONNECT_TRANSPORT_FAILED);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,8 @@ static void transport_ssl_cb(SSL* ssl, int where, int ret)
|
||||
if ((where | SSL_CB_ALERT) && (ret == 561))
|
||||
{
|
||||
transport = (rdpTransport *) SSL_get_app_data(ssl);
|
||||
transport->nlaFailure = TRUE;
|
||||
if (!freerdp_get_last_error(transport->context))
|
||||
freerdp_set_last_error(transport->context, FREERDP_ERROR_AUTHENTICATION_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1003,7 +1004,6 @@ rdpTransport* transport_new(rdpContext* context)
|
||||
transport->blocking = TRUE;
|
||||
transport->GatewayEnabled = FALSE;
|
||||
transport->layer = TRANSPORT_LAYER_TCP;
|
||||
transport->nlaFailure = FALSE;
|
||||
|
||||
if (!InitializeCriticalSectionAndSpinCount(&(transport->ReadLock), 4000))
|
||||
goto out_free_connectedEvent;
|
||||
|
@ -77,7 +77,6 @@ struct rdp_transport
|
||||
CRITICAL_SECTION ReadLock;
|
||||
CRITICAL_SECTION WriteLock;
|
||||
ULONG written;
|
||||
BOOL nlaFailure;
|
||||
};
|
||||
|
||||
wStream* transport_send_stream_init(rdpTransport* transport, int size);
|
||||
|
Loading…
Reference in New Issue
Block a user