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
34dc7964
Commit
34dc7964
authored
Sep 21, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Stop urlcache clearing when dll is being unloaded.
parent
66931e4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
urlcache.c
dlls/wininet/urlcache.c
+14
-1
No files found.
dlls/wininet/urlcache.c
View file @
34dc7964
...
...
@@ -2270,6 +2270,7 @@ static BOOL DeleteUrlCacheEntryInternal(const URLCACHECONTAINER * pContainer,
}
static
HANDLE
free_cache_running
;
static
HANDLE
dll_unload_event
;
static
DWORD
WINAPI
handle_full_cache_worker
(
void
*
param
)
{
FreeUrlCacheSpaceW
(
NULL
,
20
,
0
);
...
...
@@ -2523,6 +2524,10 @@ BOOL WINAPI FreeUrlCacheSpaceW(LPCWSTR cache_path, DWORD size, DWORD filter)
/* Allow other threads to use cache while cleaning */
URLCacheContainer_UnlockIndex
(
container
,
header
);
if
(
WaitForSingleObject
(
dll_unload_event
,
0
)
==
WAIT_OBJECT_0
)
{
TRACE
(
"got dll_unload_event - finishing
\n
"
);
return
TRUE
;
}
Sleep
(
0
);
header
=
URLCacheContainer_LockIndex
(
container
);
}
...
...
@@ -4342,9 +4347,15 @@ DWORD WINAPI RunOnceUrlCache(HWND hwnd, HINSTANCE hinst, LPSTR cmd, int cmdshow)
BOOL
init_urlcache
(
void
)
{
dll_unload_event
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
if
(
!
dll_unload_event
)
return
FALSE
;
free_cache_running
=
CreateSemaphoreW
(
NULL
,
1
,
1
,
NULL
);
if
(
!
free_cache_running
)
if
(
!
free_cache_running
)
{
CloseHandle
(
dll_unload_event
);
return
FALSE
;
}
URLCacheContainers_CreateDefaults
();
return
TRUE
;
...
...
@@ -4352,9 +4363,11 @@ BOOL init_urlcache(void)
void
free_urlcache
(
void
)
{
SetEvent
(
dll_unload_event
);
WaitForSingleObject
(
free_cache_running
,
INFINITE
);
ReleaseSemaphore
(
free_cache_running
,
1
,
NULL
);
CloseHandle
(
free_cache_running
);
CloseHandle
(
dll_unload_event
);
URLCacheContainers_DeleteAll
();
}
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