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
2f34d009
Commit
2f34d009
authored
Dec 30, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 31, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Better implementation of bind stopping.
parent
ed1c7f81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
binding.c
dlls/urlmon/binding.c
+22
-6
No files found.
dlls/urlmon/binding.c
View file @
2f34d009
...
...
@@ -52,6 +52,7 @@ typedef enum {
}
download_state_t
;
#define BINDING_LOCKED 0x0001
#define BINDING_STOPPED 0x0002
struct
Binding
{
const
IBindingVtbl
*
lpBindingVtbl
;
...
...
@@ -74,6 +75,7 @@ struct Binding {
BOOL
report_mime
;
DWORD
continue_call
;
DWORD
state
;
HRESULT
hres
;
download_state_t
download_state
;
DWORD
apartment_thread
;
...
...
@@ -310,6 +312,21 @@ static void mime_available(Binding *This, LPCWSTR mime, BOOL verify)
}
}
static
void
stop_binding
(
Binding
*
binding
,
HRESULT
hres
,
LPCWSTR
str
)
{
if
(
binding
->
state
&
BINDING_LOCKED
)
{
IInternetProtocol_UnlockRequest
(
binding
->
protocol
);
binding
->
state
&=
~
BINDING_LOCKED
;
}
if
(
!
(
binding
->
state
&
BINDING_STOPPED
))
{
binding
->
state
|=
BINDING_STOPPED
;
IBindStatusCallback_OnStopBinding
(
binding
->
callback
,
hres
,
str
);
binding
->
hres
=
hres
;
}
}
#define STREAM_THIS(iface) DEFINE_THIS(ProtocolStream, Stream, iface)
static
HRESULT
WINAPI
ProtocolStream_QueryInterface
(
IStream
*
iface
,
...
...
@@ -852,9 +869,8 @@ static void report_data(Binding *This, DWORD bscf, ULONG progress, ULONG progres
IBindStatusCallback_OnDataAvailable
(
This
->
callback
,
bscf
,
progress
,
&
formatetc
,
&
This
->
stgmed
);
if
(
This
->
download_state
==
END_DOWNLOAD
)
{
IBindStatusCallback_OnStopBinding
(
This
->
callback
,
S_OK
,
NULL
);
}
if
(
This
->
download_state
==
END_DOWNLOAD
)
stop_binding
(
This
,
S_OK
,
NULL
);
}
typedef
struct
{
...
...
@@ -1167,6 +1183,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
ret
->
state
=
0
;
ret
->
download_state
=
BEFORE_DOWNLOAD
;
ret
->
task_queue_head
=
ret
->
task_queue_tail
=
NULL
;
ret
->
hres
=
S_OK
;
memset
(
&
ret
->
bindinfo
,
0
,
sizeof
(
BINDINFO
));
ret
->
bindinfo
.
cbSize
=
sizeof
(
BINDINFO
);
...
...
@@ -1232,7 +1249,7 @@ static HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding **
hres
=
IBindStatusCallback_OnStartBinding
(
binding
->
callback
,
0
,
BINDING
(
binding
));
if
(
FAILED
(
hres
))
{
WARN
(
"OnStartBinding failed: %08x
\n
"
,
hres
);
IBindStatusCallback_OnStopBinding
(
binding
->
callback
,
0x800c0008
,
NULL
);
stop_binding
(
binding
,
0x800c0008
,
NULL
);
IBinding_Release
(
BINDING
(
binding
));
return
hres
;
}
...
...
@@ -1245,8 +1262,7 @@ static HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding **
if
(
FAILED
(
hres
))
{
WARN
(
"Start failed: %08x
\n
"
,
hres
);
IInternetProtocol_Terminate
(
binding
->
protocol
,
0
);
IBindStatusCallback_OnStopBinding
(
binding
->
callback
,
S_OK
,
NULL
);
stop_binding
(
binding
,
hres
,
NULL
);
IBinding_Release
(
BINDING
(
binding
));
return
hres
;
...
...
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