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
ccc5ba29
Commit
ccc5ba29
authored
Jun 06, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added a helper function for releasing protocol handler.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cded0779
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
13 deletions
+32
-13
bindprot.c
dlls/urlmon/bindprot.c
+28
-11
urlmon_main.h
dlls/urlmon/urlmon_main.h
+4
-2
No files found.
dlls/urlmon/bindprot.c
View file @
ccc5ba29
...
...
@@ -328,6 +328,31 @@ static ULONG WINAPI BindProtocol_AddRef(IInternetProtocolEx *iface)
return
ref
;
}
static
void
release_protocol_handler
(
BindProtocol
*
This
)
{
if
(
This
->
wininet_info
)
{
IWinInetInfo_Release
(
This
->
wininet_info
);
This
->
wininet_info
=
NULL
;
}
if
(
This
->
wininet_http_info
)
{
IWinInetHttpInfo_Release
(
This
->
wininet_http_info
);
This
->
wininet_http_info
=
NULL
;
}
if
(
This
->
protocol
)
{
IInternetProtocol_Release
(
This
->
protocol
);
This
->
protocol
=
NULL
;
}
if
(
This
->
protocol_handler
&&
This
->
protocol_handler
!=
&
This
->
default_protocol_handler
.
IInternetProtocol_iface
)
{
IInternetProtocol_Release
(
This
->
protocol_handler
);
This
->
protocol_handler
=
&
This
->
default_protocol_handler
.
IInternetProtocol_iface
;
}
if
(
This
->
protocol_sink_handler
&&
This
->
protocol_sink_handler
!=
&
This
->
default_protocol_handler
.
IInternetProtocolSink_iface
)
{
IInternetProtocolSink_Release
(
This
->
protocol_sink_handler
);
This
->
protocol_sink_handler
=
&
This
->
default_protocol_handler
.
IInternetProtocolSink_iface
;
}
}
static
ULONG
WINAPI
BindProtocol_Release
(
IInternetProtocolEx
*
iface
)
{
BindProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
...
...
@@ -336,19 +361,11 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
wininet_info
)
IWinInetInfo_Release
(
This
->
wininet_info
);
if
(
This
->
wininet_http_info
)
IWinInetHttpInfo_Release
(
This
->
wininet_http_info
);
if
(
This
->
protocol
)
IInternetProtocol_Release
(
This
->
protocol
);
release_protocol_handler
(
This
);
if
(
This
->
redirect_callback
)
IBindCallbackRedirect_Release
(
This
->
redirect_callback
);
if
(
This
->
bind_info
)
IInternetBindInfo_Release
(
This
->
bind_info
);
if
(
This
->
protocol_handler
&&
This
->
protocol_handler
!=
&
This
->
default_protocol_handler
.
IInternetProtocol_iface
)
IInternetProtocol_Release
(
This
->
protocol_handler
);
if
(
This
->
protocol_sink_handler
&&
This
->
protocol_sink_handler
!=
&
This
->
default_protocol_handler
.
IInternetProtocolSink_iface
)
IInternetProtocolSink_Release
(
This
->
protocol_sink_handler
);
if
(
This
->
uri
)
IUri_Release
(
This
->
uri
);
SysFreeString
(
This
->
display_uri
);
...
...
dlls/urlmon/urlmon_main.h
View file @
ccc5ba29
...
...
@@ -176,11 +176,13 @@ typedef struct {
LONG
ref
;
IInternetProtocol
*
protocol
;
IWinInetInfo
*
wininet_info
;
IWinInetHttpInfo
*
wininet_http_info
;
IInternetBindInfo
*
bind_info
;
IInternetProtocolSink
*
protocol_sink
;
IServiceProvider
*
service_provider
;
IWinInetInfo
*
wininet_info
;
IWinInetHttpInfo
*
wininet_http_info
;
IBindCallbackRedirect
*
redirect_callback
;
struct
{
IInternetProtocol
IInternetProtocol_iface
;
...
...
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