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
0b421006
Commit
0b421006
authored
May 14, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
May 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Store connect timeout in all layers.
parent
888505d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
2 deletions
+57
-2
http.c
dlls/wininet/http.c
+1
-1
internet.c
dlls/wininet/internet.c
+55
-1
internet.h
dlls/wininet/internet.h
+1
-0
No files found.
dlls/wininet/http.c
View file @
0b421006
...
...
@@ -5606,7 +5606,7 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName,
session
->
password
=
heap_strdupW
(
lpszPassword
);
session
->
serverPort
=
serverPort
;
session
->
hostPort
=
serverPort
;
session
->
connect_timeout
=
INFINITE
;
session
->
connect_timeout
=
hIC
->
connect_timeout
;
session
->
send_timeout
=
INFINITE
;
session
->
receive_timeout
=
INFINITE
;
...
...
dlls/wininet/internet.c
View file @
0b421006
...
...
@@ -109,6 +109,7 @@ typedef struct
}
proxyinfo_t
;
static
ULONG
max_conns
=
2
,
max_1_0_conns
=
4
;
static
ULONG
connect_timeout
=
60000
;
static
const
WCHAR
szInternetSettings
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
...
...
@@ -874,16 +875,47 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe
*
size
=
sizeof
(
INTERNET_PROXY_INFOA
)
+
proxyBytesRequired
+
proxyBypassBytesRequired
;
return
ERROR_SUCCESS
;
}
case
INTERNET_OPTION_CONNECT_TIMEOUT
:
TRACE
(
"INTERNET_OPTION_CONNECT_TIMEOUT
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
ULONG
*
)
buffer
=
ai
->
connect_timeout
;
*
size
=
sizeof
(
ULONG
);
return
ERROR_SUCCESS
;
}
return
INET_QueryOption
(
hdr
,
option
,
buffer
,
size
,
unicode
);
}
static
DWORD
APPINFO_SetOption
(
object_header_t
*
hdr
,
DWORD
option
,
void
*
buf
,
DWORD
size
)
{
appinfo_t
*
ai
=
(
appinfo_t
*
)
hdr
;
switch
(
option
)
{
case
INTERNET_OPTION_CONNECT_TIMEOUT
:
TRACE
(
"INTERNET_OPTION_CONNECT_TIMEOUT
\n
"
);
if
(
size
!=
sizeof
(
connect_timeout
))
return
ERROR_INTERNET_BAD_OPTION_LENGTH
;
if
(
!*
(
ULONG
*
)
buf
)
return
ERROR_BAD_ARGUMENTS
;
ai
->
connect_timeout
=
*
(
ULONG
*
)
buf
;
return
ERROR_SUCCESS
;
}
return
INET_SetOption
(
hdr
,
option
,
buf
,
size
);
}
static
const
object_vtbl_t
APPINFOVtbl
=
{
APPINFO_Destroy
,
NULL
,
APPINFO_QueryOption
,
INET
_SetOption
,
APPINFO
_SetOption
,
NULL
,
NULL
,
NULL
,
...
...
@@ -946,6 +978,7 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType,
lpwai
->
accessType
=
dwAccessType
;
lpwai
->
proxyUsername
=
NULL
;
lpwai
->
proxyPassword
=
NULL
;
lpwai
->
connect_timeout
=
connect_timeout
;
lpwai
->
agent
=
heap_strdupW
(
lpszAgent
);
if
(
dwAccessType
==
INTERNET_OPEN_TYPE_PRECONFIG
)
...
...
@@ -2438,6 +2471,16 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
case
INTERNET_OPTION_POLICY
:
return
ERROR_INVALID_PARAMETER
;
case
INTERNET_OPTION_CONNECT_TIMEOUT
:
TRACE
(
"INTERNET_OPTION_CONNECT_TIMEOUT
\n
"
);
if
(
*
size
<
sizeof
(
ULONG
))
return
ERROR_INSUFFICIENT_BUFFER
;
*
(
ULONG
*
)
buffer
=
connect_timeout
;
*
size
=
sizeof
(
ULONG
);
return
ERROR_SUCCESS
;
}
FIXME
(
"Stub for %d
\n
"
,
option
);
...
...
@@ -2581,6 +2624,17 @@ static DWORD set_global_option(DWORD option, void *buf, DWORD size)
max_1_0_conns
=
*
(
ULONG
*
)
buf
;
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_CONNECT_TIMEOUT
:
TRACE
(
"INTERNET_OPTION_CONNECT_TIMEOUT
\n
"
);
if
(
size
!=
sizeof
(
connect_timeout
))
return
ERROR_INTERNET_BAD_OPTION_LENGTH
;
if
(
!*
(
ULONG
*
)
buf
)
return
ERROR_BAD_ARGUMENTS
;
connect_timeout
=
*
(
ULONG
*
)
buf
;
return
ERROR_SUCCESS
;
}
return
ERROR_INTERNET_INVALID_OPTION
;
...
...
dlls/wininet/internet.h
View file @
0b421006
...
...
@@ -253,6 +253,7 @@ typedef struct
LPWSTR
proxyUsername
;
LPWSTR
proxyPassword
;
DWORD
accessType
;
DWORD
connect_timeout
;
}
appinfo_t
;
typedef
struct
...
...
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