Add handling for connection broker error codes

This commit is contained in:
Samuel Mannehed 2017-10-04 15:51:36 +02:00
parent e272feaa8a
commit e8562507e7
3 changed files with 78 additions and 0 deletions

View File

@ -569,6 +569,17 @@ enum RDP_INPUT_DEVICE
#define ERRINFO_LICENSE_BAD_CLIENT_ENCRYPTION 0x0108
#define ERRINFO_LICENSE_CANT_UPGRADE_LICENSE 0x0109
#define ERRINFO_LICENSE_NO_REMOTE_CONNECTIONS 0x010a
#define ERRINFO_CB_DESTINATION_NOT_FOUND 0x0400
#define ERRINFO_CB_LOADING_DESTINATION 0x0402
#define ERRINFO_CB_REDIRECTING_TO_DESTINATION 0x0404
#define ERRINFO_CB_SESSION_ONLINE_VM_WAKE 0x0405
#define ERRINFO_CB_SESSION_ONLINE_VM_BOOT 0x0406
#define ERRINFO_CB_SESSION_ONLINE_VM_NO_DNS 0x0407
#define ERRINFO_CB_DESTINATION_POOL_NOT_FREE 0x0408
#define ERRINFO_CB_CONNECTION_CANCELLED 0x0409
#define ERRINFO_CB_CONNECTION_ERROR_INVALID_SETTINGS 0x0410
#define ERRINFO_CB_SESSION_ONLINE_VM_BOOT_TIMEOUT 0x0411
#define ERRINFO_CB_SESSION_ONLINE_VM_SESSMON_FAILED 0x0412
/* SeamlessRDP constants */
#define SEAMLESSRDP_NOTYETMAPPED -1

View File

@ -389,6 +389,61 @@ handle_disconnect_reason(RD_BOOL deactivated, uint16 reason)
retval = EXRD_LIC_NOREMOTE;
break;
case ERRINFO_CB_DESTINATION_NOT_FOUND:
text = "The target endpoint chosen by the broker could not be found";
retval = EXRD_CB_DEST_NOT_FOUND;
break;
case ERRINFO_CB_LOADING_DESTINATION:
text = "The target endpoint is disconnecting from the broker";
retval = EXRD_CB_DEST_LOADING;
break;
case ERRINFO_CB_REDIRECTING_TO_DESTINATION:
text = "Error occured while being redirected by broker";
retval = EXRD_CB_REDIR_DEST;
break;
case ERRINFO_CB_SESSION_ONLINE_VM_WAKE:
text = "Error while the endpoint VM was being awakened by the broker";
retval = EXRD_CB_VM_WAKE;
break;
case ERRINFO_CB_SESSION_ONLINE_VM_BOOT:
text = "Error while the endpoint VM was being started by the broker";
retval = EXRD_CB_VM_BOOT;
break;
case ERRINFO_CB_SESSION_ONLINE_VM_NO_DNS:
text = "The IP address of the endpoint VM could not be determined by the broker";
retval = EXRD_CB_VM_NODNS;
break;
case ERRINFO_CB_DESTINATION_POOL_NOT_FREE:
text = "No available endpoints in the connection broker pool";
retval = EXRD_CB_DEST_POOL_NOT_FREE;
break;
case ERRINFO_CB_CONNECTION_CANCELLED:
text = "Connection processing cancelled by the broker";
retval = EXRD_CB_CONNECTION_CANCELLED;
break;
case ERRINFO_CB_CONNECTION_ERROR_INVALID_SETTINGS:
text = "The connection settings could not be validated by the broker";
retval = EXRD_CB_INVALID_SETTINGS;
break;
case ERRINFO_CB_SESSION_ONLINE_VM_BOOT_TIMEOUT:
text = "Timeout while the endpoint VM was being started by the broker";
retval = EXRD_CB_VM_BOOT_TIMEOUT;
break;
case ERRINFO_CB_SESSION_ONLINE_VM_SESSMON_FAILED:
text = "Session monitoring error while the endpoint VM was being started by the broker";
retval = EXRD_CB_VM_BOOT_SESSMON_FAILED;
break;
default:
text = "Unknown reason";
retval = EXRD_UNKNOWN;

View File

@ -117,6 +117,18 @@
#define EXRD_LIC_UPGRADE 25
#define EXRD_LIC_NOREMOTE 26
#define EXRD_CB_DEST_NOT_FOUND 30
#define EXRD_CB_DEST_LOADING 32
#define EXRD_CB_REDIR_DEST 34
#define EXRD_CB_VM_WAKE 35
#define EXRD_CB_VM_BOOT 36
#define EXRD_CB_VM_NODNS 37
#define EXRD_CB_DEST_POOL_NOT_FREE 38
#define EXRD_CB_CONNECTION_CANCELLED 39
#define EXRD_CB_INVALID_SETTINGS 40
#define EXRD_CB_VM_BOOT_TIMEOUT 41
#define EXRD_CB_VM_BOOT_SESSMON_FAILED 42
/* other exit codes */
#define EXRD_WINDOW_CLOSED 62
#define EXRD_UNKNOWN 63