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
80dd9b9c
Commit
80dd9b9c
authored
Jun 04, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use a copy of PROTOCOLDATA in Switch/Continue implementation.
parent
de36782c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
bindprot.c
dlls/urlmon/bindprot.c
+16
-6
protocol.c
dlls/urlmon/tests/protocol.c
+8
-0
No files found.
dlls/urlmon/bindprot.c
View file @
80dd9b9c
...
...
@@ -608,10 +608,14 @@ static HRESULT WINAPI ProtocolHandler_Start(IInternetProtocol *iface, LPCWSTR sz
static
HRESULT
WINAPI
ProtocolHandler_Continue
(
IInternetProtocol
*
iface
,
PROTOCOLDATA
*
pProtocolData
)
{
BindProtocol
*
This
=
PROTOCOLHANDLER_THIS
(
iface
);
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
return
IInternetProtocol_Continue
(
This
->
protocol
,
pProtocolData
);
hres
=
IInternetProtocol_Continue
(
This
->
protocol
,
pProtocolData
);
heap_free
(
pProtocolData
);
return
hres
;
}
static
HRESULT
WINAPI
ProtocolHandler_Abort
(
IInternetProtocol
*
iface
,
HRESULT
hrReason
,
...
...
@@ -874,14 +878,14 @@ static ULONG WINAPI BPInternetProtocolSink_Release(IInternetProtocolSink *iface)
typedef
struct
{
task_header_t
header
;
PROTOCOLDATA
data
;
PROTOCOLDATA
*
data
;
}
switch_task_t
;
static
void
switch_proc
(
BindProtocol
*
bind
,
task_header_t
*
t
)
{
switch_task_t
*
task
=
(
switch_task_t
*
)
t
;
IInternetProtocol_Continue
(
bind
->
protocol_handler
,
&
task
->
data
);
IInternetProtocol_Continue
(
bind
->
protocol_handler
,
task
->
data
);
heap_free
(
task
);
}
...
...
@@ -890,12 +894,18 @@ static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface
PROTOCOLDATA
*
pProtocolData
)
{
BindProtocol
*
This
=
PROTSINK_THIS
(
iface
);
PROTOCOLDATA
*
data
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
TRACE
(
"flags %x state %x data %p cb %u
\n
"
,
pProtocolData
->
grfFlags
,
pProtocolData
->
dwState
,
pProtocolData
->
pData
,
pProtocolData
->
cbData
);
data
=
heap_alloc
(
sizeof
(
PROTOCOLDATA
));
if
(
!
data
)
return
E_OUTOFMEMORY
;
memcpy
(
data
,
pProtocolData
,
sizeof
(
PROTOCOLDATA
));
if
(
!
do_direct_notif
(
This
))
{
switch_task_t
*
task
;
...
...
@@ -903,18 +913,18 @@ static HRESULT WINAPI BPInternetProtocolSink_Switch(IInternetProtocolSink *iface
if
(
!
task
)
return
E_OUTOFMEMORY
;
task
->
data
=
*
pProtocolD
ata
;
task
->
data
=
d
ata
;
push_task
(
This
,
&
task
->
header
,
switch_proc
);
return
S_OK
;
}
if
(
!
This
->
protocol_sink
)
{
IInternetProtocol_Continue
(
This
->
protocol_handler
,
pProtocolD
ata
);
IInternetProtocol_Continue
(
This
->
protocol_handler
,
d
ata
);
return
S_OK
;
}
return
IInternetProtocolSink_Switch
(
This
->
protocol_sink
,
pProtocolD
ata
);
return
IInternetProtocolSink_Switch
(
This
->
protocol_sink
,
d
ata
);
}
static
void
report_progress
(
BindProtocol
*
This
,
ULONG
status_code
,
LPCWSTR
status_text
)
...
...
dlls/urlmon/tests/protocol.c
View file @
80dd9b9c
...
...
@@ -436,6 +436,10 @@ static HRESULT WINAPI ProtocolSink_Switch(IInternetProtocolSink *iface, PROTOCOL
CHECK_EXPECT
(
Switch
);
ok
(
pProtocolData
!=
NULL
,
"pProtocolData == NULL
\n
"
);
if
(
binding_test
)
{
ok
(
pProtocolData
!=
&
protocoldata
,
"pProtocolData == &protocoldata
\n
"
);
ok
(
!
memcmp
(
pProtocolData
,
&
protocoldata
,
sizeof
(
PROTOCOLDATA
)),
"*pProtocolData != protocoldata
\n
"
);
}
pdata
=
pProtocolData
;
...
...
@@ -1321,6 +1325,10 @@ static HRESULT WINAPI ProtocolEmul_Continue(IInternetProtocol *iface,
ok
(
pProtocolData
!=
NULL
,
"pProtocolData == NULL
\n
"
);
if
(
!
pProtocolData
||
tested_protocol
==
BIND_TEST
)
return
S_OK
;
if
(
binding_test
)
{
ok
(
pProtocolData
!=
&
protocoldata
,
"pProtocolData == &protocoldata
\n
"
);
ok
(
!
memcmp
(
pProtocolData
,
&
protocoldata
,
sizeof
(
PROTOCOLDATA
)),
"*pProtocolData != protocoldata
\n
"
);
}
switch
(
prot_state
)
{
case
1
:
{
...
...
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