[core,license] set an error code on client failure

This commit is contained in:
akallabeth
2025-05-19 11:43:40 +02:00
parent 3d57474136
commit 6fc02b4c14

View File

@@ -853,7 +853,7 @@ fail:
* @return if the operation completed successfully
*/
state_run_t license_client_recv(rdpLicense* license, wStream* s)
static state_run_t license_client_recv_int(rdpLicense* license, wStream* s)
{
BYTE flags = 0;
BYTE bMsgType = 0;
@@ -922,6 +922,16 @@ state_run_t license_client_recv(rdpLicense* license, wStream* s)
return STATE_RUN_SUCCESS;
}
state_run_t license_client_recv(rdpLicense* license, wStream* s)
{
state_run_t rc = license_client_recv_int(license, s);
if (state_run_failed(rc))
{
freerdp_set_last_error(license->rdp->context, ERROR_CTX_LICENSE_CLIENT_INVALID);
}
return rc;
}
state_run_t license_server_recv(rdpLicense* license, wStream* s)
{
state_run_t rc = STATE_RUN_FAILED;