Set last error on activation timeout (#7502)
This commit is contained in:
parent
4a4d783d4f
commit
feb6d9ae5c
@ -269,6 +269,7 @@ extern "C"
|
||||
#define ERRCONNECT_ACCOUNT_EXPIRED 0x00000019
|
||||
#define ERRCONNECT_LOGON_TYPE_NOT_GRANTED 0x0000001A
|
||||
#define ERRCONNECT_NO_OR_MISSING_CREDENTIALS 0x0000001B
|
||||
#define ERRCONNECT_ACTIVATION_TIMEOUT 0x0000001C
|
||||
|
||||
#define ERRCONNECT_SUCCESS ERRINFO_SUCCESS
|
||||
#define ERRCONNECT_NONE ERRINFO_NONE
|
||||
@ -349,6 +350,9 @@ extern "C"
|
||||
#define FREERDP_ERROR_CONNECT_NO_OR_MISSING_CREDENTIALS \
|
||||
MAKE_FREERDP_ERROR(CONNECT, ERRCONNECT_NO_OR_MISSING_CREDENTIALS)
|
||||
|
||||
#define FREERDP_ERROR_CONNECT_ACTIVATION_TIMEOUT \
|
||||
MAKE_FREERDP_ERROR(CONNECT, ERRCONNECT_ACTIVATION_TIMEOUT)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -485,6 +485,7 @@ BOOL rdp_recv_deactivate_all(rdpRdp* rdp, wStream* s)
|
||||
}
|
||||
|
||||
WLog_ERR(TAG, "Timeout waiting for activation");
|
||||
freerdp_set_last_error_if_not(rdp->context, FREERDP_ERROR_CONNECT_ACTIVATION_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -275,9 +275,9 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
char* user = NULL;
|
||||
char* domain = NULL;
|
||||
char* cookie = NULL;
|
||||
int user_length = 0;
|
||||
int domain_length = 0;
|
||||
int cookie_length = 0;
|
||||
size_t user_length = 0;
|
||||
size_t domain_length = 0;
|
||||
size_t cookie_length = 0;
|
||||
|
||||
if (settings->Username)
|
||||
{
|
||||
@ -392,6 +392,7 @@ BOOL rdp_client_connect(rdpRdp* rdp)
|
||||
}
|
||||
|
||||
WLog_ERR(TAG, "Timeout waiting for activation");
|
||||
freerdp_set_last_error_if_not(rdp->context, FREERDP_ERROR_CONNECT_ACTIVATION_TIMEOUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -1565,7 +1566,7 @@ BOOL rdp_set_state(rdpRdp* rdp, CONNECTION_STATE state)
|
||||
|
||||
const char* rdp_get_state_string(rdpRdp* rdp)
|
||||
{
|
||||
int state = rdp_get_state(rdp);
|
||||
CONNECTION_STATE state = rdp_get_state(rdp);
|
||||
return rdp_state_string(state);
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,8 @@
|
||||
|
||||
#define ERRCONNECT_NO_OR_MISSING_CREDENTIALS_STRING "Credentials invalid or missing."
|
||||
|
||||
#define ERRCONNECT_ACTIVATION_TIMEOUT_STRING "Timeout waiting for activation."
|
||||
|
||||
/* Special codes */
|
||||
#define ERRCONNECT_SUCCESS_STRING "Success."
|
||||
#define ERRCONNECT_NONE_STRING ""
|
||||
@ -130,6 +132,7 @@ static const ERRINFO ERRCONNECT_CODES[] = {
|
||||
ERRCONNECT_DEFINE(ACCOUNT_EXPIRED, CAT_ADMIN),
|
||||
ERRCONNECT_DEFINE(LOGON_TYPE_NOT_GRANTED, CAT_ADMIN),
|
||||
ERRCONNECT_DEFINE(NO_OR_MISSING_CREDENTIALS, CAT_USE),
|
||||
ERRCONNECT_DEFINE(ACTIVATION_TIMEOUT, CAT_PROTOCOL),
|
||||
|
||||
ERRCONNECT_DEFINE(NONE, CAT_NONE)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user