[QMGR] Sync with Wine Staging 1.9.23. CORE-12409

svn path=/trunk/; revision=73287
This commit is contained in:
Amine Khaldi 2016-11-17 23:01:19 +00:00
parent e1e4c63781
commit 757b0ecb88
3 changed files with 10 additions and 9 deletions

View file

@ -193,7 +193,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
return S_OK;
}
static HRESULT error_from_http_response(DWORD code)
static HRESULT hresult_from_http_response(DWORD code)
{
switch (code)
{
@ -231,7 +231,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
if (WinHttpQueryHeaders(handle, WINHTTP_QUERY_STATUS_CODE|WINHTTP_QUERY_FLAG_NUMBER,
NULL, &code, &size, NULL))
{
if ((job->error.code = error_from_http_response(code)))
if ((job->error.code = hresult_from_http_response(code)))
{
EnterCriticalSection(&job->cs);
@ -273,7 +273,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
case WINHTTP_CALLBACK_STATUS_REQUEST_ERROR:
{
WINHTTP_ASYNC_RESULT *result = (WINHTTP_ASYNC_RESULT *)buf;
job->error.code = result->dwError;
job->error.code = HRESULT_FROM_WIN32(result->dwError);
transitionJobState(job, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_ERROR);
break;
}
@ -378,10 +378,10 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
if (!set_request_credentials(req, job)) goto done;
if (!(WinHttpSendRequest(req, job->http_options.headers, ~0u, NULL, 0, 0, (DWORD_PTR)file))) goto done;
if (wait_for_completion(job) || job->error.code) goto done;
if (wait_for_completion(job) || FAILED(job->error.code)) goto done;
if (!(WinHttpReceiveResponse(req, NULL))) goto done;
if (wait_for_completion(job) || job->error.code) goto done;
if (wait_for_completion(job) || FAILED(job->error.code)) goto done;
transitionJobState(job, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_TRANSFERRING);
@ -392,7 +392,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
{
file->read_size = 0;
if (!(ret = WinHttpReadData(req, buf, sizeof(buf), NULL))) break;
if (wait_for_completion(job) || job->error.code)
if (wait_for_completion(job) || FAILED(job->error.code))
{
ret = FALSE;
break;

View file

@ -364,7 +364,8 @@ static HRESULT WINAPI BackgroundCopyJob_Resume(
&& This->state != BG_JOB_STATE_TRANSFERRING)
{
This->state = BG_JOB_STATE_QUEUED;
This->error.context = This->error.code = 0;
This->error.context = 0;
This->error.code = S_OK;
if (This->error.file)
{
IBackgroundCopyFile2_Release(This->error.file);
@ -1238,7 +1239,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
This->callback2 = FALSE;
This->error.context = 0;
This->error.code = 0;
This->error.code = S_OK;
This->error.file = NULL;
memset(&This->http_options, 0, sizeof(This->http_options));

View file

@ -153,7 +153,7 @@ reactos/dll/win32/powrprof # Forked at Wine-1.0rc5
reactos/dll/win32/printui # Synced to WineStaging-1.9.11
reactos/dll/win32/propsys # Synced to WineStaging-1.9.16
reactos/dll/win32/pstorec # Synced to WineStaging-1.9.16
reactos/dll/win32/qmgr # Synced to WineStaging-1.9.11
reactos/dll/win32/qmgr # Synced to WineStaging-1.9.23
reactos/dll/win32/qmgrprxy # Synced to WineStaging-1.9.11
reactos/dll/win32/query # Synced to WineStaging-1.9.11
reactos/dll/win32/rasapi32 # Synced to WineStaging-1.9.11