libfreerdp-core: fix server-side update encoding edge case

This commit is contained in:
Marc-André Moreau 2013-07-28 16:31:38 -04:00
parent fdcf3a75be
commit 8a4e83bdfb
2 changed files with 14 additions and 5 deletions

View File

@ -517,6 +517,12 @@ static BOOL update_check_flush(rdpContext* context, int size)
s = update->us;
if (!update->us)
{
update->BeginPaint(context);
return FALSE;
}
if (Stream_GetPosition(s) + size + 256 >= settings->MultifragMaxRequestSize)
{
update_flush(context);

View File

@ -62,13 +62,16 @@ DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds)
thread = (WINPR_THREAD*) Object;
status = pthread_join(thread->thread, &thread_status);
if (thread->started)
{
status = pthread_join(thread->thread, &thread_status);
if (status != 0)
fprintf(stderr, "WaitForSingleObject: pthread_join failure: %d\n", status);
if (status != 0)
fprintf(stderr, "WaitForSingleObject: pthread_join failure: %d\n", status);
if (thread_status)
thread->dwExitCode = ((DWORD) (size_t) thread_status);
if (thread_status)
thread->dwExitCode = ((DWORD) (size_t) thread_status);
}
}
else if (Type == HANDLE_TYPE_MUTEX)
{