qmgr: Change job state on failure in transfer_file_http.
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
98f7468f9a
commit
fb704266fa
|
@ -420,7 +420,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;
|
||||||
|
@ -525,13 +526,9 @@ BOOL processFile(BackgroundCopyFileImpl *file, BackgroundCopyJobImpl *job)
|
||||||
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))
|
||||||
|
|
Loading…
Reference in New Issue