mirror of https://github.com/FreeRDP/FreeRDP
libfreerdp-core: facilities for storing and retrieving 'error info'
This commit is contained in:
parent
6a3cc63290
commit
b9a008ae8a
|
@ -100,6 +100,8 @@ FREERDP_API boolean freerdp_disconnect(freerdp* instance);
|
|||
FREERDP_API boolean freerdp_get_fds(freerdp* instance, void** rfds, int* rcount, void** wfds, int* wcount);
|
||||
FREERDP_API boolean freerdp_check_fds(freerdp* instance);
|
||||
|
||||
FREERDP_API uint32 freerdp_error_info(freerdp* instance);
|
||||
|
||||
FREERDP_API freerdp* freerdp_new();
|
||||
FREERDP_API void freerdp_free(freerdp* instance);
|
||||
|
||||
|
|
|
@ -151,6 +151,11 @@ void freerdp_context_free(freerdp* instance)
|
|||
IFCALL(instance->ContextFree, instance, instance->context);
|
||||
}
|
||||
|
||||
uint32 freerdp_error_info(freerdp* instance)
|
||||
{
|
||||
return instance->context->rdp->errorInfo;
|
||||
}
|
||||
|
||||
freerdp* freerdp_new()
|
||||
{
|
||||
freerdp* instance;
|
||||
|
|
|
@ -425,14 +425,12 @@ boolean rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, uint8 type, uint16 channel_id)
|
|||
return True;
|
||||
}
|
||||
|
||||
void rdp_recv_set_error_info_data_pdu(STREAM* s)
|
||||
void rdp_recv_set_error_info_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
{
|
||||
uint32 errorInfo;
|
||||
stream_read_uint32(s, rdp->errorInfo); /* errorInfo (4 bytes) */
|
||||
|
||||
stream_read_uint32(s, errorInfo); /* errorInfo (4 bytes) */
|
||||
|
||||
if (errorInfo != ERRINFO_SUCCESS)
|
||||
rdp_print_errinfo(errorInfo);
|
||||
if (rdp->errorInfo != ERRINFO_SUCCESS)
|
||||
rdp_print_errinfo(rdp->errorInfo);
|
||||
}
|
||||
|
||||
void rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
|
||||
|
@ -514,7 +512,7 @@ void rdp_recv_data_pdu(rdpRdp* rdp, STREAM* s)
|
|||
break;
|
||||
|
||||
case DATA_PDU_TYPE_SET_ERROR_INFO:
|
||||
rdp_recv_set_error_info_data_pdu(s);
|
||||
rdp_recv_set_error_info_data_pdu(rdp, s);
|
||||
break;
|
||||
|
||||
case DATA_PDU_TYPE_DRAW_NINEGRID_ERROR:
|
||||
|
|
|
@ -144,6 +144,7 @@ struct rdp_rdp
|
|||
uint8 fips_sign_key[20];
|
||||
uint8 fips_encrypt_key[24];
|
||||
uint8 fips_decrypt_key[24];
|
||||
uint32 errorInfo;
|
||||
};
|
||||
|
||||
void rdp_read_security_header(STREAM* s, uint16* flags);
|
||||
|
|
Loading…
Reference in New Issue