libfreerdp-core: fix build warnings and windows broken build
This commit is contained in:
parent
65ff98bb99
commit
14b75d1b27
@ -111,7 +111,6 @@ int bulk_decompress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstD
|
||||
|
||||
int bulk_compress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize, UINT32* pFlags)
|
||||
{
|
||||
UINT32 type;
|
||||
int status = -1;
|
||||
UINT32 CompressedBytes;
|
||||
UINT32 UncompressedBytes;
|
||||
@ -133,6 +132,7 @@ int bulk_compress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstDat
|
||||
|
||||
#ifdef WITH_BULK_DEBUG
|
||||
{
|
||||
UINT32 type;
|
||||
double CompressionRatio;
|
||||
double TotalCompressionRatio;
|
||||
|
||||
|
@ -224,6 +224,12 @@ BIO_METHOD* BIO_s_tsg(void)
|
||||
|
||||
BOOL transport_connect_tls(rdpTransport* transport)
|
||||
{
|
||||
freerdp* instance;
|
||||
rdpContext* context;
|
||||
|
||||
instance = (freerdp*) transport->settings->instance;
|
||||
context = instance->context;
|
||||
|
||||
if (transport->layer == TRANSPORT_LAYER_TSG)
|
||||
{
|
||||
transport->TsgTls = tls_new(transport->settings);
|
||||
@ -244,10 +250,8 @@ BOOL transport_connect_tls(rdpTransport* transport)
|
||||
if (!connectErrorCode)
|
||||
connectErrorCode = TLSCONNECTERROR;
|
||||
|
||||
if (!freerdp_get_last_error(((freerdp*)(transport->settings->instance))->context))
|
||||
{
|
||||
freerdp_set_last_error(((freerdp*)(transport->settings->instance))->context, FREERDP_ERROR_TLS_CONNECT_FAILED);
|
||||
}
|
||||
if (!freerdp_get_last_error(context))
|
||||
freerdp_set_last_error(context, FREERDP_ERROR_TLS_CONNECT_FAILED);
|
||||
|
||||
tls_free(transport->TsgTls);
|
||||
transport->TsgTls = NULL;
|
||||
@ -278,10 +282,8 @@ BOOL transport_connect_tls(rdpTransport* transport)
|
||||
if (!connectErrorCode)
|
||||
connectErrorCode = TLSCONNECTERROR;
|
||||
|
||||
if (!freerdp_get_last_error(((freerdp*)(transport->settings->instance))->context))
|
||||
{
|
||||
freerdp_set_last_error(((freerdp*)(transport->settings->instance))->context, FREERDP_ERROR_TLS_CONNECT_FAILED);
|
||||
}
|
||||
if (!freerdp_get_last_error(context))
|
||||
freerdp_set_last_error(context, FREERDP_ERROR_TLS_CONNECT_FAILED);
|
||||
|
||||
tls_free(transport->TlsIn);
|
||||
|
||||
@ -1032,7 +1034,7 @@ BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking)
|
||||
return status;
|
||||
}
|
||||
|
||||
BOOL transport_set_gateway_enabled(rdpTransport* transport, BOOL GatewayEnabled)
|
||||
void transport_set_gateway_enabled(rdpTransport* transport, BOOL GatewayEnabled)
|
||||
{
|
||||
transport->GatewayEnabled = GatewayEnabled;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ int transport_write(rdpTransport* transport, wStream* s);
|
||||
void transport_get_fds(rdpTransport* transport, void** rfds, int* rcount);
|
||||
int transport_check_fds(rdpTransport* transport);
|
||||
BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking);
|
||||
BOOL transport_set_gateway_enabled(rdpTransport* transport, BOOL GatewayEnabled);
|
||||
void transport_set_gateway_enabled(rdpTransport* transport, BOOL GatewayEnabled);
|
||||
void transport_get_read_handles(rdpTransport* transport, HANDLE* events, DWORD* count);
|
||||
|
||||
wStream* transport_receive_pool_take(rdpTransport* transport);
|
||||
|
@ -696,11 +696,6 @@ BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname, int po
|
||||
if (instance->VerifyX509Certificate)
|
||||
{
|
||||
status = instance->VerifyX509Certificate(instance, pemCert, length, hostname, port, 0);
|
||||
|
||||
if (status < 0)
|
||||
{
|
||||
freerdp_set_last_error(instance->context, FREERDP_ERROR_CONNECT_CANCELLED);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "VerifyX509Certificate: (length = %d) status: %d\n%s\n",
|
||||
@ -794,11 +789,6 @@ BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname, int po
|
||||
if (instance->VerifyCertificate)
|
||||
{
|
||||
accept_certificate = instance->VerifyCertificate(instance, subject, issuer, fingerprint);
|
||||
|
||||
if (!accept_certificate)
|
||||
{
|
||||
freerdp_set_last_error(((freerdp*) tls->settings->instance)->context, FREERDP_ERROR_CONNECT_CANCELLED);
|
||||
}
|
||||
}
|
||||
|
||||
if (!accept_certificate)
|
||||
@ -821,11 +811,6 @@ BOOL tls_verify_certificate(rdpTls* tls, CryptoCert cert, char* hostname, int po
|
||||
if (instance->VerifyChangedCertificate)
|
||||
{
|
||||
accept_certificate = instance->VerifyChangedCertificate(instance, subject, issuer, fingerprint, "");
|
||||
|
||||
if (!accept_certificate)
|
||||
{
|
||||
freerdp_set_last_error(((freerdp*) tls->settings->instance)->context, FREERDP_ERROR_CONNECT_CANCELLED);
|
||||
}
|
||||
}
|
||||
|
||||
if (!accept_certificate)
|
||||
|
@ -328,14 +328,14 @@ BOOL CancelWaitableTimer(HANDLE hTimer)
|
||||
* http://www.cs.wustl.edu/~schmidt/Timer_Queue.html
|
||||
*/
|
||||
|
||||
static void timespec_add_ms(struct timespec* tspec, UINT32 ms)
|
||||
void timespec_add_ms(struct timespec* tspec, UINT32 ms)
|
||||
{
|
||||
UINT64 ns = tspec->tv_nsec + (ms * 1000000);
|
||||
tspec->tv_sec += (ns / 1000000000);
|
||||
tspec->tv_nsec = (ns % 1000000000);
|
||||
}
|
||||
|
||||
static UINT64 timespec_to_ms(struct timespec* tspec)
|
||||
UINT64 timespec_to_ms(struct timespec* tspec)
|
||||
{
|
||||
UINT64 ms;
|
||||
ms = tspec->tv_sec * 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user