Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
36014639
Commit
36014639
authored
Jul 29, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Factor out request initialization.
parent
fb7fc894
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
request.c
dlls/winhttp/request.c
+25
-19
No files found.
dlls/winhttp/request.c
View file @
36014639
...
...
@@ -2985,21 +2985,8 @@ static HRESULT WINAPI winhttp_request_WaitForResponse(
}
}
static
HRESULT
WINAPI
winhttp_request_Abort
(
IWinHttpRequest
*
iface
)
static
void
initialize_request
(
struct
winhttp_request
*
request
)
{
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
TRACE
(
"%p
\n
"
,
request
);
SetEvent
(
request
->
cancel
);
WinHttpCloseHandle
(
request
->
hrequest
);
WinHttpCloseHandle
(
request
->
hconnect
);
WinHttpCloseHandle
(
request
->
hsession
);
CloseHandle
(
request
->
wait
);
CloseHandle
(
request
->
cancel
);
heap_free
(
request
->
buffer
);
heap_free
(
request
->
verb
);
request
->
state
=
REQUEST_STATE_INVALID
;
request
->
hrequest
=
NULL
;
request
->
hconnect
=
NULL
;
...
...
@@ -3015,6 +3002,28 @@ static HRESULT WINAPI winhttp_request_Abort(
request
->
proxy
.
dwAccessType
=
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
;
request
->
proxy
.
lpszProxy
=
NULL
;
request
->
proxy
.
lpszProxyBypass
=
NULL
;
request
->
resolve_timeout
=
0
;
request
->
connect_timeout
=
60000
;
request
->
send_timeout
=
30000
;
request
->
receive_timeout
=
30000
;
}
static
HRESULT
WINAPI
winhttp_request_Abort
(
IWinHttpRequest
*
iface
)
{
struct
winhttp_request
*
request
=
impl_from_IWinHttpRequest
(
iface
);
TRACE
(
"%p
\n
"
,
request
);
SetEvent
(
request
->
cancel
);
WinHttpCloseHandle
(
request
->
hrequest
);
WinHttpCloseHandle
(
request
->
hconnect
);
WinHttpCloseHandle
(
request
->
hsession
);
CloseHandle
(
request
->
wait
);
CloseHandle
(
request
->
cancel
);
heap_free
(
request
->
buffer
);
heap_free
(
request
->
verb
);
initialize_request
(
request
);
return
S_OK
;
}
...
...
@@ -3088,13 +3097,10 @@ HRESULT WinHttpRequest_create( IUnknown *unknown, void **obj )
TRACE
(
"%p, %p
\n
"
,
unknown
,
obj
);
if
(
!
(
request
=
heap_alloc
_zero
(
sizeof
(
*
request
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
request
=
heap_alloc
(
sizeof
(
*
request
)
)))
return
E_OUTOFMEMORY
;
request
->
IWinHttpRequest_iface
.
lpVtbl
=
&
winhttp_request_vtbl
;
request
->
refs
=
1
;
request
->
resolve_timeout
=
0
;
request
->
connect_timeout
=
60000
;
request
->
send_timeout
=
30000
;
request
->
receive_timeout
=
30000
;
initialize_request
(
request
);
*
obj
=
&
request
->
IWinHttpRequest_iface
;
TRACE
(
"returning iface %p
\n
"
,
*
obj
);
...
...
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