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
65034ce2
Commit
65034ce2
authored
Sep 18, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Set entry type based on container type.
parent
8f2b0fdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
urlcache.c
dlls/wininet/tests/urlcache.c
+0
-3
urlcache.c
dlls/wininet/urlcache.c
+11
-6
No files found.
dlls/wininet/tests/urlcache.c
View file @
65034ce2
...
...
@@ -377,7 +377,6 @@ static void test_urlcacheA(void)
"expected zero ExpireTime
\n
"
);
ok
(
!
memcmp
(
&
lpCacheEntryInfo
->
LastModifiedTime
,
&
filetime_zero
,
sizeof
(
FILETIME
)),
"expected zero LastModifiedTime
\n
"
);
todo_wine
ok
(
lpCacheEntryInfo
->
CacheEntryType
==
(
NORMAL_CACHE_ENTRY
|
URLHISTORY_CACHE_ENTRY
)
||
broken
(
lpCacheEntryInfo
->
CacheEntryType
==
NORMAL_CACHE_ENTRY
/* NT4/W2k */
),
"expected type NORMAL_CACHE_ENTRY|URLHISTORY_CACHE_ENTRY, got %08x
\n
"
,
...
...
@@ -406,7 +405,6 @@ static void test_urlcacheA(void)
"expected positive ExpireTime
\n
"
);
ok
(
memcmp
(
&
lpCacheEntryInfo2
->
LastModifiedTime
,
&
filetime_zero
,
sizeof
(
FILETIME
)),
"expected positive LastModifiedTime
\n
"
);
todo_wine
ok
(
lpCacheEntryInfo2
->
CacheEntryType
==
(
NORMAL_CACHE_ENTRY
|
URLHISTORY_CACHE_ENTRY
)
||
broken
(
lpCacheEntryInfo2
->
CacheEntryType
==
NORMAL_CACHE_ENTRY
/* NT4/W2k */
),
"expected type NORMAL_CACHE_ENTRY|URLHISTORY_CACHE_ENTRY, got %08x
\n
"
,
...
...
@@ -515,7 +513,6 @@ static void test_urlcacheA(void)
ret
=
GetUrlCacheEntryInfo
(
TEST_URL
,
lpCacheEntryInfo
,
&
cbCacheEntryInfo
);
ok
(
ret
,
"GetUrlCacheEntryInfo failed with error %d
\n
"
,
GetLastError
());
/* with the previous entry type retained.. */
todo_wine
ok
(
lpCacheEntryInfo
->
CacheEntryType
&
NORMAL_CACHE_ENTRY
,
"expected cache entry type NORMAL_CACHE_ENTRY, got %d (0x%08x)
\n
"
,
lpCacheEntryInfo
->
CacheEntryType
,
lpCacheEntryInfo
->
CacheEntryType
);
...
...
dlls/wininet/urlcache.c
View file @
65034ce2
...
...
@@ -186,6 +186,7 @@ typedef struct _URLCACHECONTAINER
HANDLE
hMapping
;
/* handle of file mapping */
DWORD
file_size
;
/* size of file when mapping was opened */
HANDLE
hMutex
;
/* handle of mutex */
DWORD
default_entry_type
;
}
URLCACHECONTAINER
;
...
...
@@ -475,7 +476,8 @@ static void URLCacheContainer_CloseIndex(URLCACHECONTAINER * pContainer)
pContainer
->
hMapping
=
NULL
;
}
static
BOOL
URLCacheContainers_AddContainer
(
LPCWSTR
cache_prefix
,
LPCWSTR
path
,
LPWSTR
mutex_name
)
static
BOOL
URLCacheContainers_AddContainer
(
LPCWSTR
cache_prefix
,
LPCWSTR
path
,
DWORD
default_entry_type
,
LPWSTR
mutex_name
)
{
URLCACHECONTAINER
*
pContainer
=
heap_alloc
(
sizeof
(
URLCACHECONTAINER
));
int
cache_prefix_len
=
strlenW
(
cache_prefix
);
...
...
@@ -487,6 +489,7 @@ static BOOL URLCacheContainers_AddContainer(LPCWSTR cache_prefix, LPCWSTR path,
pContainer
->
hMapping
=
NULL
;
pContainer
->
file_size
=
0
;
pContainer
->
default_entry_type
=
default_entry_type
;
pContainer
->
path
=
heap_strdupW
(
path
);
if
(
!
pContainer
->
path
)
...
...
@@ -545,11 +548,12 @@ void URLCacheContainers_CreateDefaults(void)
int
nFolder
;
/* CSIDL_* constant */
const
WCHAR
*
shpath_suffix
;
/* suffix on path returned by SHGetSpecialFolderPath */
const
WCHAR
*
cache_prefix
;
/* prefix used to reference the container */
DWORD
default_entry_type
;
}
DefaultContainerData
[]
=
{
{
CSIDL_INTERNET_CACHE
,
UrlSuffix
,
UrlPrefix
},
{
CSIDL_HISTORY
,
HistorySuffix
,
HistoryPrefix
},
{
CSIDL_COOKIES
,
CookieSuffix
,
CookiePrefix
},
{
CSIDL_INTERNET_CACHE
,
UrlSuffix
,
UrlPrefix
,
NORMAL_CACHE_ENTRY
},
{
CSIDL_HISTORY
,
HistorySuffix
,
HistoryPrefix
,
URLHISTORY_CACHE_ENTRY
},
{
CSIDL_COOKIES
,
CookieSuffix
,
CookiePrefix
,
COOKIE_CACHE_ENTRY
},
};
DWORD
i
;
...
...
@@ -585,7 +589,8 @@ void URLCacheContainers_CreateDefaults(void)
wszCachePath
[
path_len
+
suffix_len
+
2
]
=
'\0'
;
}
URLCacheContainers_AddContainer
(
DefaultContainerData
[
i
].
cache_prefix
,
wszCachePath
,
wszMutexName
);
URLCacheContainers_AddContainer
(
DefaultContainerData
[
i
].
cache_prefix
,
wszCachePath
,
DefaultContainerData
[
i
].
default_entry_type
,
wszMutexName
);
}
}
...
...
@@ -2858,7 +2863,7 @@ static BOOL CommitUrlCacheEntryInternal(
url_entry_offset
=
(
LPBYTE
)
pUrlEntry
-
(
LPBYTE
)
pHeader
;
pUrlEntry
->
CacheFileEntry
.
dwSignature
=
URL_SIGNATURE
;
pUrlEntry
->
CacheDir
=
cDirectory
;
pUrlEntry
->
CacheEntryType
=
CacheEntryType
;
pUrlEntry
->
CacheEntryType
=
CacheEntryType
|
pContainer
->
default_entry_type
;
pUrlEntry
->
dwHeaderInfoSize
=
dwHeaderSize
;
if
((
CacheEntryType
&
STICKY_CACHE_ENTRY
)
&&
!
exempt_delta
)
{
...
...
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