Author: tfaber
Date: Mon Aug 17 14:21:13 2015
New Revision: 68739
URL:
http://svn.reactos.org/svn/reactos?rev=68739&view=rev
Log:
[QMGR]
- Do not omit mandatory argument to WriteFile. Fixes crash in qmgr_winetest:job
Modified:
trunk/reactos/dll/win32/qmgr/file.c
Modified: trunk/reactos/dll/win32/qmgr/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/qmgr/file.c?rev=…
==============================================================================
--- trunk/reactos/dll/win32/qmgr/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/qmgr/file.c [iso-8859-1] Mon Aug 17 14:21:13 2015
@@ -365,6 +365,7 @@
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);
@@ -397,7 +398,7 @@
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;