[QMGR] Sync with Wine Staging 1.9.11. CORE-11368

svn path=/trunk/; revision=71583
This commit is contained in:
Amine Khaldi 2016-06-07 10:55:17 +00:00
parent 5de9cef087
commit 93c6e744bd
4 changed files with 14 additions and 9 deletions

View file

@ -412,7 +412,8 @@ done:
WinHttpCloseHandle(req); WinHttpCloseHandle(req);
WinHttpCloseHandle(con); WinHttpCloseHandle(con);
WinHttpCloseHandle(ses); WinHttpCloseHandle(ses);
if (!ret) DeleteFileW(tmpfile); if (!ret && !transitionJobState(job, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_ERROR))
transitionJobState(job, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_ERROR);
SetEvent(job->done); SetEvent(job->done);
return ret; return ret;
@ -513,17 +514,15 @@ BOOL processFile(BackgroundCopyFileImpl *file, BackgroundCopyJobImpl *job)
uc.nPort = 0; uc.nPort = 0;
uc.lpszUrlPath = NULL; uc.lpszUrlPath = NULL;
uc.dwUrlPathLength = ~0u; uc.dwUrlPathLength = ~0u;
uc.lpszExtraInfo = NULL;
uc.dwExtraInfoLength = 0;
ret = WinHttpCrackUrl(file->info.RemoteName, 0, 0, &uc); ret = WinHttpCrackUrl(file->info.RemoteName, 0, 0, &uc);
if (!ret) if (!ret)
{ {
TRACE("WinHttpCrackUrl failed, trying local file copy\n"); TRACE("WinHttpCrackUrl failed, trying local file copy\n");
if (!transfer_file_local(file, tmpName)) return FALSE; if (!transfer_file_local(file, tmpName)) WARN("local transfer failed\n");
}
else if (!transfer_file_http(file, &uc, tmpName))
{
WARN("HTTP transfer failed\n");
return FALSE;
} }
else if (!transfer_file_http(file, &uc, tmpName)) WARN("HTTP transfer failed\n");
if (transitionJobState(job, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_QUEUED) || if (transitionJobState(job, BG_JOB_STATE_CONNECTING, BG_JOB_STATE_QUEUED) ||
transitionJobState(job, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_QUEUED)) transitionJobState(job, BG_JOB_STATE_TRANSFERRING, BG_JOB_STATE_QUEUED))

View file

@ -364,6 +364,12 @@ static HRESULT WINAPI BackgroundCopyJob_Resume(
&& This->state != BG_JOB_STATE_TRANSFERRING) && This->state != BG_JOB_STATE_TRANSFERRING)
{ {
This->state = BG_JOB_STATE_QUEUED; This->state = BG_JOB_STATE_QUEUED;
This->error.context = This->error.code = 0;
if (This->error.file)
{
IBackgroundCopyFile2_Release(This->error.file);
This->error.file = NULL;
}
SetEvent(globalMgr.jobEvent); SetEvent(globalMgr.jobEvent);
} }
LeaveCriticalSection(&globalMgr.cs); LeaveCriticalSection(&globalMgr.cs);

View file

@ -143,7 +143,7 @@ ServiceMain(DWORD dwArgc, LPWSTR *lpszArgv)
WaitForSingleObject(fileTxThread, INFINITE); WaitForSingleObject(fileTxThread, INFINITE);
UpdateStatus(SERVICE_STOPPED, NO_ERROR, 0); UpdateStatus(SERVICE_STOPPED, NO_ERROR, 0);
CloseHandle(stop_event); CloseHandle(stop_event);
TRACE("service stoped\n"); TRACE("service stopped\n");
CoUninitialize(); CoUninitialize();
} }

View file

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