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
1ba96882
Commit
1ba96882
authored
Jul 19, 2012
by
Heiko Hund
Committed by
Alexandre Julliard
Jul 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Make strings in WINHTTP_PROXY_INFO non-const.
parent
24a690e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
22 deletions
+22
-22
request.c
dlls/winhttp/request.c
+8
-8
session.c
dlls/winhttp/session.c
+4
-4
notification.c
dlls/winhttp/tests/notification.c
+2
-2
winhttp.c
dlls/winhttp/tests/winhttp.c
+6
-6
winhttp.h
include/winhttp.h
+2
-2
No files found.
dlls/winhttp/request.c
View file @
1ba96882
...
...
@@ -2238,8 +2238,8 @@ static void free_request( struct winhttp_request *request )
CloseHandle
(
request
->
thread
);
CloseHandle
(
request
->
wait
);
CloseHandle
(
request
->
cancel
);
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxy
);
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxyBypass
);
heap_free
(
request
->
proxy
.
lpszProxy
);
heap_free
(
request
->
proxy
.
lpszProxyBypass
);
heap_free
(
request
->
buffer
);
heap_free
(
request
->
verb
);
VariantClear
(
&
request
->
data
);
...
...
@@ -2430,16 +2430,16 @@ static HRESULT WINAPI winhttp_request_SetProxy(
{
case
HTTPREQUEST_PROXYSETTING_DEFAULT
:
request
->
proxy
.
dwAccessType
=
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY
;
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxy
);
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxyBypass
);
heap_free
(
request
->
proxy
.
lpszProxy
);
heap_free
(
request
->
proxy
.
lpszProxyBypass
);
request
->
proxy
.
lpszProxy
=
NULL
;
request
->
proxy
.
lpszProxyBypass
=
NULL
;
break
;
case
HTTPREQUEST_PROXYSETTING_DIRECT
:
request
->
proxy
.
dwAccessType
=
WINHTTP_ACCESS_TYPE_NO_PROXY
;
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxy
);
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxyBypass
);
heap_free
(
request
->
proxy
.
lpszProxy
);
heap_free
(
request
->
proxy
.
lpszProxyBypass
);
request
->
proxy
.
lpszProxy
=
NULL
;
request
->
proxy
.
lpszProxyBypass
=
NULL
;
break
;
...
...
@@ -2448,12 +2448,12 @@ static HRESULT WINAPI winhttp_request_SetProxy(
request
->
proxy
.
dwAccessType
=
WINHTTP_ACCESS_TYPE_NAMED_PROXY
;
if
(
V_VT
(
&
proxy_server
)
==
VT_BSTR
)
{
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxy
);
heap_free
(
request
->
proxy
.
lpszProxy
);
request
->
proxy
.
lpszProxy
=
strdupW
(
V_BSTR
(
&
proxy_server
)
);
}
if
(
V_VT
(
&
bypass_list
)
==
VT_BSTR
)
{
heap_free
(
(
WCHAR
*
)
request
->
proxy
.
lpszProxyBypass
);
heap_free
(
request
->
proxy
.
lpszProxyBypass
);
request
->
proxy
.
lpszProxyBypass
=
strdupW
(
V_BSTR
(
&
bypass_list
)
);
}
break
;
...
...
dlls/winhttp/session.c
View file @
1ba96882
...
...
@@ -229,14 +229,14 @@ HINTERNET WINAPI WinHttpOpen( LPCWSTR agent, DWORD access, LPCWSTR proxy, LPCWST
session
->
access
=
info
.
dwAccessType
;
if
(
info
.
lpszProxy
&&
!
(
session
->
proxy_server
=
strdupW
(
info
.
lpszProxy
)))
{
GlobalFree
(
(
LPWSTR
)
info
.
lpszProxy
);
GlobalFree
(
(
LPWSTR
)
info
.
lpszProxyBypass
);
GlobalFree
(
info
.
lpszProxy
);
GlobalFree
(
info
.
lpszProxyBypass
);
goto
end
;
}
if
(
info
.
lpszProxyBypass
&&
!
(
session
->
proxy_bypass
=
strdupW
(
info
.
lpszProxyBypass
)))
{
GlobalFree
(
(
LPWSTR
)
info
.
lpszProxy
);
GlobalFree
(
(
LPWSTR
)
info
.
lpszProxyBypass
);
GlobalFree
(
info
.
lpszProxy
);
GlobalFree
(
info
.
lpszProxyBypass
);
goto
end
;
}
}
...
...
dlls/winhttp/tests/notification.c
View file @
1ba96882
...
...
@@ -68,9 +68,9 @@ static BOOL proxy_active(void)
{
active
=
(
proxy_info
.
lpszProxy
!=
NULL
);
if
(
active
)
GlobalFree
(
(
HGLOBAL
)
proxy_info
.
lpszProxy
);
GlobalFree
(
proxy_info
.
lpszProxy
);
if
(
proxy_info
.
lpszProxyBypass
!=
NULL
)
GlobalFree
(
(
HGLOBAL
)
proxy_info
.
lpszProxyBypass
);
GlobalFree
(
proxy_info
.
lpszProxyBypass
);
}
else
active
=
FALSE
;
...
...
dlls/winhttp/tests/winhttp.c
View file @
1ba96882
...
...
@@ -46,9 +46,9 @@ static BOOL proxy_active(void)
{
active
=
(
proxy_info
.
lpszProxy
!=
NULL
);
if
(
active
)
GlobalFree
(
(
HGLOBAL
)
proxy_info
.
lpszProxy
);
GlobalFree
(
proxy_info
.
lpszProxy
);
if
(
proxy_info
.
lpszProxyBypass
!=
NULL
)
GlobalFree
(
(
HGLOBAL
)
proxy_info
.
lpszProxyBypass
);
GlobalFree
(
proxy_info
.
lpszProxyBypass
);
}
else
active
=
FALSE
;
...
...
@@ -1005,8 +1005,8 @@ static void set_default_proxy_reg_value( BYTE *buf, DWORD len, DWORD type )
static
void
test_set_default_proxy_config
(
void
)
{
static
const
WCHAR
wideString
[]
=
{
0x226f
,
0x575b
,
0
};
static
const
WCHAR
normalString
[]
=
{
'f'
,
'o'
,
'o'
,
0
};
static
WCHAR
wideString
[]
=
{
0x226f
,
0x575b
,
0
};
static
WCHAR
normalString
[]
=
{
'f'
,
'o'
,
'o'
,
0
};
DWORD
type
,
len
;
BYTE
*
saved_proxy_settings
=
NULL
;
WINHTTP_PROXY_INFO
info
;
...
...
@@ -2699,8 +2699,8 @@ static void test_WinHttpGetProxyForUrl(void)
trace
(
"%u
\n
"
,
info
.
dwAccessType
);
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
info
.
lpszProxy
));
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
info
.
lpszProxyBypass
));
GlobalFree
(
(
WCHAR
*
)
info
.
lpszProxy
);
GlobalFree
(
(
WCHAR
*
)
info
.
lpszProxyBypass
);
GlobalFree
(
info
.
lpszProxy
);
GlobalFree
(
info
.
lpszProxyBypass
);
}
WinHttpCloseHandle
(
session
);
}
...
...
include/winhttp.h
View file @
1ba96882
...
...
@@ -487,8 +487,8 @@ typedef struct
typedef
struct
{
DWORD
dwAccessType
;
LP
C
WSTR
lpszProxy
;
LP
C
WSTR
lpszProxyBypass
;
LPWSTR
lpszProxy
;
LPWSTR
lpszProxyBypass
;
}
WINHTTP_PROXY_INFO
,
*
LPWINHTTP_PROXY_INFO
;
typedef
WINHTTP_PROXY_INFO
WINHTTP_PROXY_INFOW
;
typedef
LPWINHTTP_PROXY_INFO
LPWINHTTP_PROXY_INFOW
;
...
...
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