mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[QMGR]
- Do not omit mandatory argument to WriteFile. Fixes crash in qmgr_winetest:job svn path=/trunk/; revision=68739
This commit is contained in:
parent
db8269be53
commit
5e606558ad
1 changed files with 2 additions and 1 deletions
|
@ -365,6 +365,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
|
||||||
DWORD flags = (uc->nScheme == INTERNET_SCHEME_HTTPS) ? WINHTTP_FLAG_SECURE : 0;
|
DWORD flags = (uc->nScheme == INTERNET_SCHEME_HTTPS) ? WINHTTP_FLAG_SECURE : 0;
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
|
DWORD written;
|
||||||
|
|
||||||
transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_CONNECTING);
|
transitionJobState(job, BG_JOB_STATE_QUEUED, BG_JOB_STATE_CONNECTING);
|
||||||
|
|
||||||
|
@ -397,7 +398,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!file->read_size) 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);
|
EnterCriticalSection(&job->cs);
|
||||||
file->fileProgress.BytesTransferred += file->read_size;
|
file->fileProgress.BytesTransferred += file->read_size;
|
||||||
|
|
Loading…
Reference in a new issue