qmgr: Do not omit mandatory argument to WriteFile.

This commit is contained in:
Thomas Faber 2015-08-17 13:56:50 +02:00 committed by Alexandre Julliard
parent 1bea5f44b0
commit bd7f43d7e8
1 changed files with 2 additions and 1 deletions

View File

@ -373,6 +373,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
DWORD flags = (uc->nScheme == INTERNET_SCHEME_HTTPS) ? WINHTTP_FLAG_SECURE : 0;
char buf[4096];
BOOL ret = FALSE;
DWORD written;
transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_CONNECTING);
@ -405,7 +406,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
break;
}
if (!file->read_size) break;
if (!(ret = WriteFile(handle, buf, file->read_size, NULL, NULL))) break;
if (!(ret = WriteFile(handle, buf, file->read_size, &written, NULL))) break;
EnterCriticalSection(&job->cs);
file->fileProgress.BytesTransferred += file->read_size;