From 757b0ecb889f45e279ba8eef05f7f17c7f234530 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 17 Nov 2016 23:01:19 +0000 Subject: [PATCH] [QMGR] Sync with Wine Staging 1.9.23. CORE-12409 svn path=/trunk/; revision=73287 --- reactos/dll/win32/qmgr/file.c | 12 ++++++------ reactos/dll/win32/qmgr/job.c | 5 +++-- reactos/media/doc/README.WINE | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/reactos/dll/win32/qmgr/file.c b/reactos/dll/win32/qmgr/file.c index f4e1b0abb52..19154649f73 100644 --- a/reactos/dll/win32/qmgr/file.c +++ b/reactos/dll/win32/qmgr/file.c @@ -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; diff --git a/reactos/dll/win32/qmgr/job.c b/reactos/dll/win32/qmgr/job.c index c0ddd7d77e5..8843bfa3207 100644 --- a/reactos/dll/win32/qmgr/job.c +++ b/reactos/dll/win32/qmgr/job.c @@ -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)); diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 58bb3750141..4dbb5f212b4 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -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