Merge branch 'master' of github.com:mrthebunny/FreeRDP
This commit is contained in:
commit
40ffe51aef
@ -1091,8 +1091,6 @@ BOOL VCAPITYPE VirtualChannelEntry(PCHANNEL_ENTRY_POINTS pEntryPoints)
|
||||
|
||||
rdpsnd->log = WLog_Get("com.freerdp.channels.rdpsnd.client");
|
||||
|
||||
WLog_SetLogLevel(rdpsnd->log, WLOG_TRACE);
|
||||
|
||||
rdpsnd->channelEntryPoints.pVirtualChannelInit(&rdpsnd->InitHandle,
|
||||
&rdpsnd->channelDef, 1, VIRTUAL_CHANNEL_VERSION_WIN2000, rdpsnd_virtual_channel_init_event);
|
||||
|
||||
|
@ -71,25 +71,8 @@ void transport_attach(rdpTransport* transport, int sockfd)
|
||||
transport->TcpOut = transport->TcpIn;
|
||||
}
|
||||
|
||||
BOOL transport_disconnect(rdpTransport* transport)
|
||||
void transport_stop(rdpTransport* transport)
|
||||
{
|
||||
BOOL status = TRUE;
|
||||
|
||||
if (!transport)
|
||||
return FALSE;
|
||||
|
||||
if (transport->layer == TRANSPORT_LAYER_TLS)
|
||||
status &= tls_disconnect(transport->TlsIn);
|
||||
|
||||
if ((transport->layer == TRANSPORT_LAYER_TSG) || (transport->layer == TRANSPORT_LAYER_TSG_TLS))
|
||||
{
|
||||
status &= tsg_disconnect(transport->tsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
status &= tcp_disconnect(transport->TcpIn);
|
||||
}
|
||||
|
||||
if (transport->async)
|
||||
{
|
||||
if (transport->stopEvent)
|
||||
@ -104,6 +87,28 @@ BOOL transport_disconnect(rdpTransport* transport)
|
||||
transport->stopEvent = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL transport_disconnect(rdpTransport* transport)
|
||||
{
|
||||
BOOL status = TRUE;
|
||||
|
||||
if (!transport)
|
||||
return FALSE;
|
||||
|
||||
transport_stop(transport);
|
||||
|
||||
if (transport->layer == TRANSPORT_LAYER_TLS)
|
||||
status &= tls_disconnect(transport->TlsIn);
|
||||
|
||||
if ((transport->layer == TRANSPORT_LAYER_TSG) || (transport->layer == TRANSPORT_LAYER_TSG_TLS))
|
||||
{
|
||||
status &= tsg_disconnect(transport->tsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
status &= tcp_disconnect(transport->TcpIn);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -1055,7 +1060,7 @@ static void* transport_client_thread(void* arg)
|
||||
|
||||
transport_get_read_handles(transport, (HANDLE*) &handles, &nCount);
|
||||
|
||||
status = WaitForMultipleObjects(nCount, handles, FALSE, 100);
|
||||
status = WaitForMultipleObjects(nCount, handles, FALSE, INFINITE);
|
||||
if (transport->layer == TRANSPORT_LAYER_CLOSED)
|
||||
{
|
||||
rdpRdp* rdp = (rdpRdp*) transport->rdp;
|
||||
@ -1121,20 +1126,7 @@ void transport_free(rdpTransport* transport)
|
||||
{
|
||||
if (transport)
|
||||
{
|
||||
if (transport->async)
|
||||
{
|
||||
if (transport->stopEvent)
|
||||
{
|
||||
SetEvent(transport->stopEvent);
|
||||
WaitForSingleObject(transport->thread, INFINITE);
|
||||
|
||||
CloseHandle(transport->thread);
|
||||
CloseHandle(transport->stopEvent);
|
||||
|
||||
transport->thread = NULL;
|
||||
transport->stopEvent = NULL;
|
||||
}
|
||||
}
|
||||
transport_stop(transport);
|
||||
|
||||
if (transport->ReceiveBuffer)
|
||||
Stream_Release(transport->ReceiveBuffer);
|
||||
|
@ -92,6 +92,7 @@ BOOL transport_connect_tsg(rdpTransport* transport);
|
||||
BOOL transport_accept_rdp(rdpTransport* transport);
|
||||
BOOL transport_accept_tls(rdpTransport* transport);
|
||||
BOOL transport_accept_nla(rdpTransport* transport);
|
||||
void transport_stop(rdpTransport* transport);
|
||||
int transport_read(rdpTransport* transport, wStream* s);
|
||||
int transport_write(rdpTransport* transport, wStream* s);
|
||||
void transport_get_fds(rdpTransport* transport, void** rfds, int* rcount);
|
||||
|
@ -408,7 +408,7 @@ void InitializeWtsApiStubs(void)
|
||||
if (!g_WtsApiModule)
|
||||
return;
|
||||
|
||||
pInitWtsApi = GetProcAddress(g_WtsApiModule, "InitWtsApi");
|
||||
pInitWtsApi = (INIT_WTSAPI_FN) GetProcAddress(g_WtsApiModule, "InitWtsApi");
|
||||
|
||||
if (pInitWtsApi)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user