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
b36cb0b9
Commit
b36cb0b9
authored
Mar 13, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Clean session related data in free_session function.
parent
e804d091
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
18 deletions
+23
-18
session.c
dlls/urlmon/session.c
+17
-10
urlmon_main.c
dlls/urlmon/urlmon_main.c
+5
-7
urlmon_main.h
dlls/urlmon/urlmon_main.h
+1
-1
No files found.
dlls/urlmon/session.c
View file @
b36cb0b9
...
@@ -119,7 +119,7 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
...
@@ -119,7 +119,7 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
return
SUCCEEDED
(
hres
)
?
S_OK
:
MK_E_SYNTAX
;
return
SUCCEEDED
(
hres
)
?
S_OK
:
MK_E_SYNTAX
;
}
}
static
HRESULT
register_namespace
(
IClassFactory
*
cf
,
REFIID
clsid
,
LPCWSTR
protocol
,
BOOL
urlmon_protocol
)
HRESULT
register_namespace
(
IClassFactory
*
cf
,
REFIID
clsid
,
LPCWSTR
protocol
,
BOOL
urlmon_protocol
)
{
{
name_space
*
new_name_space
;
name_space
*
new_name_space
;
...
@@ -165,15 +165,6 @@ static HRESULT unregister_namespace(IClassFactory *cf, LPCWSTR protocol)
...
@@ -165,15 +165,6 @@ static HRESULT unregister_namespace(IClassFactory *cf, LPCWSTR protocol)
return
S_OK
;
return
S_OK
;
}
}
void
register_urlmon_namespace
(
IClassFactory
*
cf
,
REFIID
clsid
,
LPCWSTR
protocol
,
BOOL
do_register
)
{
if
(
do_register
)
register_namespace
(
cf
,
clsid
,
protocol
,
TRUE
);
else
unregister_namespace
(
cf
,
protocol
);
}
BOOL
is_registered_protocol
(
LPCWSTR
url
)
BOOL
is_registered_protocol
(
LPCWSTR
url
)
{
{
DWORD
schema_len
;
DWORD
schema_len
;
...
@@ -675,5 +666,21 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
...
@@ -675,5 +666,21 @@ HRESULT WINAPI ObtainUserAgentString(DWORD dwOption, LPSTR pcszUAOut, DWORD *cbS
void
free_session
(
void
)
void
free_session
(
void
)
{
{
name_space
*
ns_iter
,
*
ns_last
;
mime_filter
*
mf_iter
,
*
mf_last
;
LIST_FOR_EACH_ENTRY_SAFE
(
ns_iter
,
ns_last
,
&
name_space_list
,
name_space
,
entry
)
{
if
(
!
ns_iter
->
urlmon
)
IClassFactory_Release
(
ns_iter
->
cf
);
heap_free
(
ns_iter
->
protocol
);
heap_free
(
ns_iter
);
}
LIST_FOR_EACH_ENTRY_SAFE
(
mf_iter
,
mf_last
,
&
mime_filter_list
,
mime_filter
,
entry
)
{
IClassFactory_Release
(
mf_iter
->
cf
);
heap_free
(
mf_iter
->
mime
);
heap_free
(
mf_iter
);
}
heap_free
(
user_agent
);
heap_free
(
user_agent
);
}
}
dlls/urlmon/urlmon_main.c
View file @
b36cb0b9
...
@@ -42,7 +42,7 @@ LONG URLMON_refCount = 0;
...
@@ -42,7 +42,7 @@ LONG URLMON_refCount = 0;
static
HMODULE
hCabinet
=
NULL
;
static
HMODULE
hCabinet
=
NULL
;
static
DWORD
urlmon_tls
=
TLS_OUT_OF_INDEXES
;
static
DWORD
urlmon_tls
=
TLS_OUT_OF_INDEXES
;
static
void
init_session
(
BOOL
);
static
void
init_session
(
void
);
static
struct
list
tls_list
=
LIST_INIT
(
tls_list
);
static
struct
list
tls_list
=
LIST_INIT
(
tls_list
);
...
@@ -136,7 +136,6 @@ static void process_detach(void)
...
@@ -136,7 +136,6 @@ static void process_detach(void)
if
(
hCabinet
)
if
(
hCabinet
)
FreeLibrary
(
hCabinet
);
FreeLibrary
(
hCabinet
);
init_session
(
FALSE
);
free_session
();
free_session
();
free_tls_list
();
free_tls_list
();
}
}
...
@@ -152,7 +151,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
...
@@ -152,7 +151,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
switch
(
fdwReason
)
{
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
init_session
(
TRUE
);
init_session
();
break
;
break
;
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
...
@@ -327,15 +326,14 @@ static const struct object_creation_info object_creation[] =
...
@@ -327,15 +326,14 @@ static const struct object_creation_info object_creation[] =
{
&
CLSID_CUri
,
&
CUriCF
.
IClassFactory_iface
,
NULL
}
{
&
CLSID_CUri
,
&
CUriCF
.
IClassFactory_iface
,
NULL
}
};
};
static
void
init_session
(
BOOL
init
)
static
void
init_session
(
void
)
{
{
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
object_creation
)
/
sizeof
(
object_creation
[
0
]);
i
++
)
{
for
(
i
=
0
;
i
<
sizeof
(
object_creation
)
/
sizeof
(
object_creation
[
0
]);
i
++
)
{
if
(
object_creation
[
i
].
protocol
)
if
(
object_creation
[
i
].
protocol
)
register_
urlmon_
namespace
(
object_creation
[
i
].
cf
,
object_creation
[
i
].
clsid
,
register_namespace
(
object_creation
[
i
].
cf
,
object_creation
[
i
].
clsid
,
object_creation
[
i
].
protocol
,
init
);
object_creation
[
i
].
protocol
,
TRUE
);
}
}
}
}
...
...
dlls/urlmon/urlmon_main.h
View file @
b36cb0b9
...
@@ -68,7 +68,7 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR) DECLSPEC_HIDDEN;
...
@@ -68,7 +68,7 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR) DECLSPEC_HIDDEN;
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_protocol_handler
(
IUri
*
,
CLSID
*
,
BOOL
*
,
IClassFactory
**
)
DECLSPEC_HIDDEN
;
IInternetProtocol
*
get_mime_filter
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
IInternetProtocol
*
get_mime_filter
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
BOOL
is_registered_protocol
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
BOOL
is_registered_protocol
(
LPCWSTR
)
DECLSPEC_HIDDEN
;
void
register_urlmon
_namespace
(
IClassFactory
*
,
REFIID
,
LPCWSTR
,
BOOL
)
DECLSPEC_HIDDEN
;
HRESULT
register
_namespace
(
IClassFactory
*
,
REFIID
,
LPCWSTR
,
BOOL
)
DECLSPEC_HIDDEN
;
HINTERNET
get_internet_session
(
IInternetBindInfo
*
)
DECLSPEC_HIDDEN
;
HINTERNET
get_internet_session
(
IInternetBindInfo
*
)
DECLSPEC_HIDDEN
;
LPWSTR
get_useragent
(
void
)
DECLSPEC_HIDDEN
;
LPWSTR
get_useragent
(
void
)
DECLSPEC_HIDDEN
;
void
free_session
(
void
)
DECLSPEC_HIDDEN
;
void
free_session
(
void
)
DECLSPEC_HIDDEN
;
...
...
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