Setting freerdp_last_error in gateway error response.

This commit is contained in:
Armin Novak 2019-09-23 11:26:55 +02:00
parent 6f9cb89c5d
commit 733cc36462
2 changed files with 6 additions and 0 deletions

View File

@ -664,6 +664,7 @@ static BOOL rdg_process_handshake_response(rdpRdg* rdg, wStream* s)
if (FAILED(errorCode))
{
WLog_ERR(TAG, "Handshake error %s", error);
freerdp_set_last_error(rdg->context, errorCode);
return FALSE;
}
@ -700,6 +701,7 @@ static BOOL rdg_process_tunnel_response(rdpRdg* rdg, wStream* s)
if (FAILED(errorCode))
{
WLog_ERR(TAG, "Tunnel creation error %s", error);
freerdp_set_last_error(rdg->context, errorCode);
return FALSE;
}
@ -735,6 +737,7 @@ static BOOL rdg_process_tunnel_authorization_response(rdpRdg* rdg, wStream* s)
if (FAILED(errorCode))
{
WLog_ERR(TAG, "Tunnel authorization error %s", error);
freerdp_set_last_error(rdg->context, errorCode);
return FALSE;
}
@ -771,6 +774,7 @@ static BOOL rdg_process_channel_response(rdpRdg* rdg, wStream* s)
{
WLog_ERR(TAG, "channel response errorCode=%s, fieldsPresent=%s",
error, channel_response_fields_present_to_string(fieldsPresent));
freerdp_set_last_error(rdg->context, errorCode);
return FALSE;
}

View File

@ -395,6 +395,8 @@ BOOL transport_connect(rdpTransport* transport, const char* hostname,
if (!transport->tsg)
return FALSE;
/* Reset error condition from RDG */
freerdp_set_last_error(context, FREERDP_ERROR_SUCCESS);
status = tsg_connect(transport->tsg, hostname, port, timeout);
if (status)