Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ec6a17fa
Commit
ec6a17fa
authored
Sep 14, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qmgr: Job error codes are HRESULT values.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
13af267e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
file.c
dlls/qmgr/file.c
+6
-6
job.c
dlls/qmgr/job.c
+3
-2
No files found.
dlls/qmgr/file.c
View file @
ec6a17fa
...
@@ -201,7 +201,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
...
@@ -201,7 +201,7 @@ HRESULT BackgroundCopyFileConstructor(BackgroundCopyJobImpl *owner,
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
error
_from_http_response
(
DWORD
code
)
static
HRESULT
hresult
_from_http_response
(
DWORD
code
)
{
{
switch
(
code
)
switch
(
code
)
{
{
...
@@ -239,7 +239,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
...
@@ -239,7 +239,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
if
(
WinHttpQueryHeaders
(
handle
,
WINHTTP_QUERY_STATUS_CODE
|
WINHTTP_QUERY_FLAG_NUMBER
,
if
(
WinHttpQueryHeaders
(
handle
,
WINHTTP_QUERY_STATUS_CODE
|
WINHTTP_QUERY_FLAG_NUMBER
,
NULL
,
&
code
,
&
size
,
NULL
))
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
);
EnterCriticalSection
(
&
job
->
cs
);
...
@@ -281,7 +281,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
...
@@ -281,7 +281,7 @@ static void CALLBACK progress_callback_http(HINTERNET handle, DWORD_PTR context,
case
WINHTTP_CALLBACK_STATUS_REQUEST_ERROR
:
case
WINHTTP_CALLBACK_STATUS_REQUEST_ERROR
:
{
{
WINHTTP_ASYNC_RESULT
*
result
=
(
WINHTTP_ASYNC_RESULT
*
)
buf
;
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
);
transitionJobState
(
job
,
BG_JOB_STATE_TRANSFERRING
,
BG_JOB_STATE_ERROR
);
break
;
break
;
}
}
...
@@ -386,10 +386,10 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
...
@@ -386,10 +386,10 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
if
(
!
set_request_credentials
(
req
,
job
))
goto
done
;
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
(
!
(
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
(
!
(
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
);
transitionJobState
(
job
,
BG_JOB_STATE_CONNECTING
,
BG_JOB_STATE_TRANSFERRING
);
...
@@ -400,7 +400,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
...
@@ -400,7 +400,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
{
{
file
->
read_size
=
0
;
file
->
read_size
=
0
;
if
(
!
(
ret
=
WinHttpReadData
(
req
,
buf
,
sizeof
(
buf
),
NULL
)))
break
;
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
;
ret
=
FALSE
;
break
;
break
;
...
...
dlls/qmgr/job.c
View file @
ec6a17fa
...
@@ -371,7 +371,8 @@ static HRESULT WINAPI BackgroundCopyJob_Resume(
...
@@ -371,7 +371,8 @@ 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
;
This
->
error
.
context
=
0
;
This
->
error
.
code
=
S_OK
;
if
(
This
->
error
.
file
)
if
(
This
->
error
.
file
)
{
{
IBackgroundCopyFile2_Release
(
This
->
error
.
file
);
IBackgroundCopyFile2_Release
(
This
->
error
.
file
);
...
@@ -1245,7 +1246,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
...
@@ -1245,7 +1246,7 @@ HRESULT BackgroundCopyJobConstructor(LPCWSTR displayName, BG_JOB_TYPE type, GUID
This
->
callback2
=
FALSE
;
This
->
callback2
=
FALSE
;
This
->
error
.
context
=
0
;
This
->
error
.
context
=
0
;
This
->
error
.
code
=
0
;
This
->
error
.
code
=
S_OK
;
This
->
error
.
file
=
NULL
;
This
->
error
.
file
=
NULL
;
memset
(
&
This
->
http_options
,
0
,
sizeof
(
This
->
http_options
));
memset
(
&
This
->
http_options
,
0
,
sizeof
(
This
->
http_options
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment