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
6c5f759d
Commit
6c5f759d
authored
Oct 23, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cryptnet: Set timeout on http connections when a timeout is specified.
parent
cdca3018
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
cryptnet_main.c
dlls/cryptnet/cryptnet_main.c
+16
-4
No files found.
dlls/cryptnet/cryptnet_main.c
View file @
6c5f759d
...
...
@@ -785,6 +785,14 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
if
(
hHttp
)
{
if
(
dwTimeout
)
{
InternetSetOptionW
(
hHttp
,
INTERNET_OPTION_RECEIVE_TIMEOUT
,
&
dwTimeout
,
sizeof
(
dwTimeout
));
InternetSetOptionW
(
hHttp
,
INTERNET_OPTION_SEND_TIMEOUT
,
&
dwTimeout
,
sizeof
(
dwTimeout
));
}
ret
=
HttpSendRequestExW
(
hHttp
,
NULL
,
NULL
,
0
,
(
DWORD_PTR
)
context
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_IO_PENDING
)
...
...
@@ -795,14 +803,18 @@ static BOOL WINAPI HTTP_RetrieveEncodedObjectW(LPCWSTR pszURL,
else
ret
=
TRUE
;
}
ret
=
HttpEndRequestW
(
hHttp
,
NULL
,
0
,
(
DWORD_PTR
)
context
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_IO_PENDING
)
/* We don't set ret to TRUE in this block to avoid masking
* an error from HttpSendRequestExW.
*/
if
(
!
HttpEndRequestW
(
hHttp
,
NULL
,
0
,
(
DWORD_PTR
)
context
)
&&
GetLastError
()
==
ERROR_IO_PENDING
)
{
if
(
WaitForSingleObject
(
context
->
event
,
context
->
timeout
)
==
WAIT_TIMEOUT
)
{
SetLastError
(
ERROR_TIMEOUT
);
else
ret
=
TRUE
;
ret
=
FALSE
;
}
}
if
(
ret
)
ret
=
CRYPT_DownloadObject
(
dwRetrievalFlags
,
hHttp
,
...
...
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