From: Martin Fleisz Date: Mon, 21 Mar 2016 15:58:09 +0000 (+0100) Subject: core: correctly set last error on credssp errors X-Git-Tag: 2.0.0-beta1+android10~239^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d956ebbb1fc0cc84567d13512b233259d51e7e8;p=platform%2Fupstream%2Ffreerdp.git core: correctly set last error on credssp errors --- diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index 4a9ed61..457326d 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -572,12 +572,6 @@ int nla_client_authenticate(rdpNla* nla) if (status < 0) { - if (nla->errorCode) - { - WLog_ERR(TAG, "SPNEGO failed with NTSTATUS: %08X", nla->errorCode); - freerdp_set_last_error(nla->instance->context, nla->errorCode); - } - Stream_Free(s, TRUE); return -1; } @@ -1564,6 +1558,13 @@ int nla_recv_pdu(rdpNla* nla, wStream* s) if (nla_decode_ts_request(nla, s) < 1) return -1; + if (nla->errorCode) + { + WLog_ERR(TAG, "SPNEGO failed with NTSTATUS: %08X", nla->errorCode); + freerdp_set_last_error(nla->instance->context, nla->errorCode); + return -1; + } + if (nla_client_recv(nla) < 1) return -1;