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
027238f8
Commit
027238f8
authored
Jul 21, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Jul 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: De-Hungarian proxyinfo_t.
parent
dbcbf0c4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
+30
-30
internet.c
dlls/wininet/internet.c
+30
-30
No files found.
dlls/wininet/internet.c
View file @
027238f8
...
...
@@ -105,9 +105,9 @@ static UINT_PTR handle_table_size;
typedef
struct
{
DWORD
dwP
roxyEnabled
;
LPWSTR
lpszProxyServer
;
LPWSTR
lpszP
roxyBypass
;
DWORD
p
roxyEnabled
;
LPWSTR
proxy
;
LPWSTR
p
roxyBypass
;
}
proxyinfo_t
;
static
const
WCHAR
szInternetSettings
[]
=
...
...
@@ -337,15 +337,15 @@ static LONG INTERNET_SaveProxySettings( proxyinfo_t *lpwpi )
if
((
ret
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
szInternetSettings
,
&
key
)))
return
ret
;
if
((
ret
=
RegSetValueExW
(
key
,
szProxyEnable
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
lpwpi
->
dwP
roxyEnabled
,
sizeof
(
DWORD
))))
if
((
ret
=
RegSetValueExW
(
key
,
szProxyEnable
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
lpwpi
->
p
roxyEnabled
,
sizeof
(
DWORD
))))
{
RegCloseKey
(
key
);
return
ret
;
}
if
(
lpwpi
->
lpszProxyServer
)
if
(
lpwpi
->
proxy
)
{
if
((
ret
=
RegSetValueExW
(
key
,
szProxyServer
,
0
,
REG_SZ
,
(
BYTE
*
)
lpwpi
->
lpszProxyServer
,
sizeof
(
WCHAR
)
*
(
lstrlenW
(
lpwpi
->
lpszProxyServer
)
+
1
))))
if
((
ret
=
RegSetValueExW
(
key
,
szProxyServer
,
0
,
REG_SZ
,
(
BYTE
*
)
lpwpi
->
proxy
,
sizeof
(
WCHAR
)
*
(
lstrlenW
(
lpwpi
->
proxy
)
+
1
))))
{
RegCloseKey
(
key
);
return
ret
;
...
...
@@ -494,8 +494,8 @@ BOOL WINAPI DetectAutoProxyUrl(LPSTR lpszAutoProxyUrl,
static
void
FreeProxyInfo
(
proxyinfo_t
*
lpwpi
)
{
heap_free
(
lpwpi
->
lpszProxyServer
);
heap_free
(
lpwpi
->
lpszP
roxyBypass
);
heap_free
(
lpwpi
->
proxy
);
heap_free
(
lpwpi
->
p
roxyBypass
);
}
/***********************************************************************
...
...
@@ -520,17 +520,17 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
return
ret
;
len
=
sizeof
(
DWORD
);
if
(
RegQueryValueExW
(
key
,
szProxyEnable
,
NULL
,
&
type
,
(
BYTE
*
)
&
lpwpi
->
dwP
roxyEnabled
,
&
len
)
||
type
!=
REG_DWORD
)
if
(
RegQueryValueExW
(
key
,
szProxyEnable
,
NULL
,
&
type
,
(
BYTE
*
)
&
lpwpi
->
p
roxyEnabled
,
&
len
)
||
type
!=
REG_DWORD
)
{
lpwpi
->
dwP
roxyEnabled
=
0
;
if
((
ret
=
RegSetValueExW
(
key
,
szProxyEnable
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
lpwpi
->
dwP
roxyEnabled
,
sizeof
(
DWORD
)
)))
lpwpi
->
p
roxyEnabled
=
0
;
if
((
ret
=
RegSetValueExW
(
key
,
szProxyEnable
,
0
,
REG_DWORD
,
(
BYTE
*
)
&
lpwpi
->
p
roxyEnabled
,
sizeof
(
DWORD
)
)))
{
RegCloseKey
(
key
);
return
ret
;
}
}
if
(
!
(
envproxy
=
getenv
(
"http_proxy"
))
||
lpwpi
->
dwP
roxyEnabled
)
if
(
!
(
envproxy
=
getenv
(
"http_proxy"
))
||
lpwpi
->
p
roxyEnabled
)
{
TRACE
(
"Proxy is enabled.
\n
"
);
...
...
@@ -557,14 +557,14 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
p
=
strchrW
(
szProxy
,
' '
);
if
(
p
)
*
p
=
0
;
lpwpi
->
lpszProxyServer
=
szProxy
;
lpwpi
->
proxy
=
szProxy
;
TRACE
(
"http proxy = %s
\n
"
,
debugstr_w
(
lpwpi
->
lpszProxyServer
));
TRACE
(
"http proxy = %s
\n
"
,
debugstr_w
(
lpwpi
->
proxy
));
}
else
{
TRACE
(
"No proxy server settings in registry.
\n
"
);
lpwpi
->
lpszProxyServer
=
NULL
;
lpwpi
->
proxy
=
NULL
;
}
}
else
if
(
envproxy
)
...
...
@@ -576,14 +576,14 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
return
ERROR_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
envproxy
,
-
1
,
envproxyW
,
len
);
lpwpi
->
dwP
roxyEnabled
=
1
;
lpwpi
->
lpszProxyServer
=
envproxyW
;
lpwpi
->
p
roxyEnabled
=
1
;
lpwpi
->
proxy
=
envproxyW
;
TRACE
(
"http proxy (from environment) = %s
\n
"
,
debugstr_w
(
lpwpi
->
lpszProxyServer
));
TRACE
(
"http proxy (from environment) = %s
\n
"
,
debugstr_w
(
lpwpi
->
proxy
));
}
RegCloseKey
(
key
);
lpwpi
->
lpszP
roxyBypass
=
NULL
;
lpwpi
->
p
roxyBypass
=
NULL
;
return
ERROR_SUCCESS
;
}
...
...
@@ -598,10 +598,10 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai )
if
(
INTERNET_LoadProxySettings
(
&
wpi
))
return
FALSE
;
if
(
wpi
.
dwP
roxyEnabled
)
if
(
wpi
.
p
roxyEnabled
)
{
lpwai
->
accessType
=
INTERNET_OPEN_TYPE_PROXY
;
lpwai
->
proxy
=
wpi
.
lpszProxyServer
;
lpwai
->
proxy
=
wpi
.
proxy
;
return
TRUE
;
}
...
...
@@ -2333,7 +2333,7 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *
switch
(
optionW
->
dwOption
)
{
case
INTERNET_PER_CONN_FLAGS
:
if
(
pi
.
dwP
roxyEnabled
)
if
(
pi
.
p
roxyEnabled
)
optionW
->
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
else
optionW
->
Value
.
dwValue
=
PROXY_TYPE_DIRECT
;
...
...
@@ -2341,16 +2341,16 @@ DWORD INET_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *
case
INTERNET_PER_CONN_PROXY_SERVER
:
if
(
unicode
)
optionW
->
Value
.
pszValue
=
heap_strdupW
(
pi
.
lpszProxyServer
);
optionW
->
Value
.
pszValue
=
heap_strdupW
(
pi
.
proxy
);
else
optionA
->
Value
.
pszValue
=
heap_strdupWtoA
(
pi
.
lpszProxyServer
);
optionA
->
Value
.
pszValue
=
heap_strdupWtoA
(
pi
.
proxy
);
break
;
case
INTERNET_PER_CONN_PROXY_BYPASS
:
if
(
unicode
)
optionW
->
Value
.
pszValue
=
heap_strdupW
(
pi
.
lpszP
roxyBypass
);
optionW
->
Value
.
pszValue
=
heap_strdupW
(
pi
.
p
roxyBypass
);
else
optionA
->
Value
.
pszValue
=
heap_strdupWtoA
(
pi
.
lpszP
roxyBypass
);
optionA
->
Value
.
pszValue
=
heap_strdupWtoA
(
pi
.
p
roxyBypass
);
break
;
case
INTERNET_PER_CONN_AUTOCONFIG_URL
:
...
...
@@ -2669,18 +2669,18 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
switch
(
option
->
dwOption
)
{
case
INTERNET_PER_CONN_PROXY_SERVER
:
heap_free
(
pi
.
lpszProxyServer
);
pi
.
lpszProxyServer
=
heap_strdupW
(
option
->
Value
.
pszValue
);
heap_free
(
pi
.
proxy
);
pi
.
proxy
=
heap_strdupW
(
option
->
Value
.
pszValue
);
break
;
case
INTERNET_PER_CONN_FLAGS
:
if
(
option
->
Value
.
dwValue
&
PROXY_TYPE_PROXY
)
pi
.
dwP
roxyEnabled
=
1
;
pi
.
p
roxyEnabled
=
1
;
else
{
if
(
option
->
Value
.
dwValue
!=
PROXY_TYPE_DIRECT
)
FIXME
(
"Unhandled flags: 0x%x
\n
"
,
option
->
Value
.
dwValue
);
pi
.
dwP
roxyEnabled
=
0
;
pi
.
p
roxyEnabled
=
0
;
}
break
;
...
...
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