From 59ba044ccdb3ec9a0760348bf2343982e5e09208 Mon Sep 17 00:00:00 2001 From: kubistika Date: Thu, 31 Oct 2019 11:26:13 +0200 Subject: [PATCH] server: proxy: client: always do NLA fallback --- server/proxy/pf_client.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/server/proxy/pf_client.c b/server/proxy/pf_client.c index 8c0c848..80f0a9c 100644 --- a/server/proxy/pf_client.c +++ b/server/proxy/pf_client.c @@ -333,34 +333,18 @@ static BOOL pf_client_connect(freerdp* instance) { pClientContext* pc = (pClientContext*) instance->context; BOOL rc = FALSE; - BOOL retry_without_nla = FALSE; pf_client_set_security_settings(pc); if (pf_client_should_retry_without_nla(pc)) - retry_without_nla = pc->allow_next_conn_failure = TRUE; + pc->allow_next_conn_failure = TRUE; if (!freerdp_connect(instance)) { - UINT32 last_error = freerdp_get_last_error(instance->context); - UINT32 last_error_type = GET_FREERDP_ERROR_TYPE(last_error); + WLog_ERR(TAG, "failed to connect with NLA. disabling NLA and retyring..."); - /* Do not retry if last error is not ERRCONNECT_LOGON_FAILURE */ - if (last_error_type != ERRCONNECT_LOGON_FAILURE) - retry_without_nla = FALSE; - - if (retry_without_nla) - { - WLog_ERR(TAG, "failed to connect with NLA. disabling NLA and retyring..."); - - if (!pf_client_connect_without_nla(pc)) - { - WLog_ERR(TAG, "pf_client_connect_without_nla failed!"); - goto out; - } - } - else + if (!pf_client_connect_without_nla(pc)) { - WLog_ERR(TAG, "connection failure!"); + WLog_ERR(TAG, "pf_client_connect_without_nla failed!"); goto out; } } -- 2.7.4