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
a59204a4
Commit
a59204a4
authored
Mar 08, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 08, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use separate function for setting global options.
parent
4863257e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
internet.c
dlls/wininet/internet.c
+22
-20
No files found.
dlls/wininet/internet.c
View file @
a59204a4
...
...
@@ -2540,6 +2540,17 @@ DWORD INET_SetOption(object_header_t *hdr, DWORD option, void *buf, DWORD size)
return
ERROR_INTERNET_INVALID_OPTION
;
}
static
DWORD
set_global_option
(
DWORD
option
,
void
*
buf
,
DWORD
size
)
{
switch
(
option
)
{
case
INTERNET_OPTION_CALLBACK
:
WARN
(
"Not global option %u
\n
"
,
option
);
return
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
;
}
return
ERROR_INTERNET_INVALID_OPTION
;
}
/***********************************************************************
* InternetSetOptionW (WININET.@)
*
...
...
@@ -2555,37 +2566,28 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
{
object_header_t
*
lpwhh
;
BOOL
ret
=
TRUE
;
DWORD
res
;
TRACE
(
"(%p %d %p %d)
\n
"
,
hInternet
,
dwOption
,
lpBuffer
,
dwBufferLength
);
lpwhh
=
(
object_header_t
*
)
get_handle_object
(
hInternet
);
if
(
lpwhh
)
{
DWORD
res
;
if
(
lpwhh
)
res
=
lpwhh
->
vtbl
->
SetOption
(
lpwhh
,
dwOption
,
lpBuffer
,
dwBufferLength
);
if
(
res
!=
ERROR_INTERNET_INVALID_OPTION
)
{
WININET_Release
(
lpwhh
);
else
res
=
set_global_option
(
dwOption
,
lpBuffer
,
dwBufferLength
);
if
(
res
!=
ERROR_SUCCESS
)
SetLastError
(
res
);
if
(
res
!=
ERROR_INTERNET_INVALID_OPTION
)
{
if
(
lpwhh
)
WININET_Release
(
lpwhh
);
return
res
==
ERROR_SUCCESS
;
}
if
(
res
!=
ERROR_SUCCESS
)
SetLastError
(
res
);
return
res
==
ERROR_SUCCESS
;
}
switch
(
dwOption
)
{
case
INTERNET_OPTION_CALLBACK
:
{
if
(
!
lpwhh
)
{
SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
return
FALSE
;
}
WININET_Release
(
lpwhh
);
SetLastError
(
ERROR_INTERNET_OPTION_NOT_SETTABLE
);
return
FALSE
;
}
case
INTERNET_OPTION_HTTP_VERSION
:
{
HTTP_VERSION_INFO
*
pVersion
=
(
HTTP_VERSION_INFO
*
)
lpBuffer
;
...
...
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