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
00376b5b
Commit
00376b5b
authored
May 11, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Return E_FAIL in Binding::Switch implementation.
parent
2e75a84e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
25 deletions
+26
-25
binding.c
dlls/urlmon/binding.c
+2
-25
url.c
dlls/urlmon/tests/url.c
+24
-0
No files found.
dlls/urlmon/binding.c
View file @
00376b5b
...
...
@@ -1127,37 +1127,14 @@ static ULONG WINAPI InternetProtocolSink_Release(IInternetProtocolSink *iface)
return
IBinding_Release
(
BINDING
(
This
));
}
typedef
struct
{
task_header_t
header
;
PROTOCOLDATA
data
;
}
switch_task_t
;
static
void
switch_proc
(
Binding
*
binding
,
task_header_t
*
t
)
{
switch_task_t
*
task
=
(
switch_task_t
*
)
t
;
IInternetProtocol_Continue
(
binding
->
protocol
,
&
task
->
data
);
heap_free
(
task
);
}
static
HRESULT
WINAPI
InternetProtocolSink_Switch
(
IInternetProtocolSink
*
iface
,
PROTOCOLDATA
*
pProtocolData
)
{
Binding
*
This
=
PROTSINK_THIS
(
iface
);
switch_task_t
*
task
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
task
=
heap_alloc
(
sizeof
(
switch_task_t
));
task
->
data
=
*
pProtocolData
;
WARN
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
push_task
(
This
,
&
task
->
header
,
switch_proc
);
IBinding_AddRef
(
BINDING
(
This
));
PostMessageW
(
This
->
notif_hwnd
,
WM_MK_CONTINUE
,
0
,
(
LPARAM
)
This
);
return
S_OK
;
return
E_FAIL
;
}
typedef
struct
{
...
...
dlls/urlmon/tests/url.c
View file @
00376b5b
...
...
@@ -324,6 +324,28 @@ static ULONG WINAPI Protocol_Release(IInternetProtocol *iface)
return
1
;
}
static
void
test_switch_fail
(
void
)
{
IInternetProtocolSink
*
binding_sink
;
PROTOCOLDATA
protocoldata
;
HRESULT
hres
;
static
BOOL
tested_switch_fail
;
if
(
tested_switch_fail
)
return
;
tested_switch_fail
=
TRUE
;
hres
=
IBinding_QueryInterface
(
current_binding
,
&
IID_IInternetProtocolSink
,
(
void
**
)
&
binding_sink
);
ok
(
hres
==
S_OK
,
"Could not get IInternetProtocolSink iface: %08x
\n
"
,
hres
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IInternetProtocolSink_Switch
(
binding_sink
,
&
protocoldata
);
ok
(
hres
==
E_FAIL
,
"Switch failed: %08x, expected E_FAIL
\n
"
,
hres
);
IInternetProtocolSink_Release
(
binding_sink
);
}
}
static
DWORD
WINAPI
thread_proc
(
PVOID
arg
)
{
PROTOCOLDATA
protocoldata
;
...
...
@@ -368,6 +390,8 @@ static DWORD WINAPI thread_proc(PVOID arg)
else
CHECK_CALLED
(
OnProgress_SENDINGREQUEST
);
test_switch_fail
();
SET_EXPECT
(
Continue
);
prot_state
=
1
;
hres
=
IInternetProtocolSink_Switch
(
protocol_sink
,
&
protocoldata
);
...
...
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