mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +00:00
[WININET]
- Repair the ROS-Diff from r54992. Now we hopefully don't initialize the URL cache multiple times anymore. svn path=/trunk/; revision=68726
This commit is contained in:
parent
9548c182dc
commit
c177d0cccf
2 changed files with 37 additions and 2 deletions
|
@ -804,6 +804,10 @@ static void cache_containers_init(void)
|
|||
cache_containers_add(DefaultContainerData[i].cache_prefix, wszCachePath,
|
||||
DefaultContainerData[i].default_entry_type, wszMutexName);
|
||||
}
|
||||
|
||||
#ifdef __REACTOS__
|
||||
bDefaultContainersAdded = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cache_containers_free(void)
|
||||
|
@ -823,9 +827,11 @@ static DWORD cache_containers_find(const char *url, cache_container **ret)
|
|||
if(!url)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
/* ReactOS r54992 */
|
||||
if (!bDefaultContainersAdded)
|
||||
cache_containers_init();
|
||||
#endif
|
||||
|
||||
LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry)
|
||||
{
|
||||
|
@ -853,9 +859,11 @@ static BOOL cache_containers_enum(char *search_pattern, DWORD index, cache_conta
|
|||
if (search_pattern && index > 0)
|
||||
return FALSE;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
/* ReactOS r54992 */
|
||||
if (!bDefaultContainersAdded)
|
||||
cache_containers_init();
|
||||
#endif
|
||||
|
||||
LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry)
|
||||
{
|
||||
|
@ -4014,7 +4022,9 @@ BOOL init_urlcache(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#ifndef __REACTOS__
|
||||
cache_containers_init();
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,25 +111,50 @@ diff -pudN e:\wine\dlls\wininet/urlcache.c e:\reactos\dll\win32\wininet/urlcache
|
|||
for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++)
|
||||
{
|
||||
WCHAR wszCachePath[MAX_PATH];
|
||||
@@ -835,6 +823,10 @@ static DWORD cache_containers_find(const
|
||||
@@ -816,6 +804,10 @@ static void cache_containers_init(void)
|
||||
cache_containers_add(DefaultContainerData[i].cache_prefix, wszCachePath,
|
||||
DefaultContainerData[i].default_entry_type, wszMutexName);
|
||||
}
|
||||
+
|
||||
+#ifdef __REACTOS__
|
||||
+ bDefaultContainersAdded = TRUE;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void cache_containers_free(void)
|
||||
@@ -835,6 +827,12 @@ static DWORD cache_containers_find(const
|
||||
if(!url)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
+#ifdef __REACTOS__
|
||||
+ /* ReactOS r54992 */
|
||||
+ if (!bDefaultContainersAdded)
|
||||
+ cache_containers_init();
|
||||
+#endif
|
||||
+
|
||||
LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry)
|
||||
{
|
||||
int prefix_len = strlen(container->cache_prefix);
|
||||
@@ -861,6 +853,10 @@ static BOOL cache_containers_enum(char *
|
||||
@@ -861,6 +859,12 @@ static BOOL cache_containers_enum(char *
|
||||
if (search_pattern && index > 0)
|
||||
return FALSE;
|
||||
|
||||
+#ifdef __REACTOS__
|
||||
+ /* ReactOS r54992 */
|
||||
+ if (!bDefaultContainersAdded)
|
||||
+ cache_containers_init();
|
||||
+#endif
|
||||
+
|
||||
LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry)
|
||||
{
|
||||
if (search_pattern)
|
||||
@@ -4018,7 +4022,9 @@ BOOL init_urlcache(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+#ifndef __REACTOS__
|
||||
cache_containers_init();
|
||||
+#endif
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue