Fixed comments and duplicate checks.
This commit is contained in:
parent
b05eb8d834
commit
fceb108fc5
@ -732,7 +732,7 @@ static DWORD WINAPI pf_client_thread_proc(pClientContext* pc)
|
||||
UINT32 tmp = freerdp_get_event_handles(instance->context, &handles[nCount],
|
||||
ARRAYSIZE(handles) - nCount);
|
||||
|
||||
if ((tmp == 0) || (nCount + tmp > ARRAYSIZE(handles)))
|
||||
if (tmp == 0)
|
||||
{
|
||||
PROXY_LOG_ERR(TAG, pc, "freerdp_get_event_handles failed!");
|
||||
break;
|
||||
|
@ -505,7 +505,7 @@ static DWORD WINAPI pf_server_handle_peer(LPVOID arg)
|
||||
tmp = client->GetEventHandles(client, &eventHandles[eventCount],
|
||||
ARRAYSIZE(eventHandles) - eventCount);
|
||||
|
||||
if ((tmp == 0) || (tmp >= ARRAYSIZE(eventHandles) - 2))
|
||||
if (tmp == 0)
|
||||
{
|
||||
WLog_ERR(TAG, "Failed to get FreeRDP transport event handles");
|
||||
break;
|
||||
@ -787,8 +787,8 @@ static void peer_free(void* obj)
|
||||
{
|
||||
HANDLE hdl = (HANDLE)obj;
|
||||
|
||||
// TODO: Stop thread
|
||||
|
||||
/* Threads have been notified about pending termination at this point.
|
||||
*/
|
||||
if (hdl != _GetCurrentThread())
|
||||
WaitForSingleObject(hdl, INFINITE);
|
||||
CloseHandle(hdl);
|
||||
|
Loading…
Reference in New Issue
Block a user