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
601b6835
Commit
601b6835
authored
Oct 22, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Oct 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Introduce a URLCache_FindHashW, and use it rather than URLCache_FindEntryInHashW.
parent
af61cbdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
18 deletions
+11
-18
urlcache.c
dlls/wininet/urlcache.c
+11
-18
No files found.
dlls/wininet/urlcache.c
View file @
601b6835
...
...
@@ -1163,20 +1163,8 @@ static BOOL URLCache_FindHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, struct
return
FALSE
;
}
/***********************************************************************
* URLCache_FindEntryInHashW (Internal)
*
* Searches all the hash tables in the index for the given URL and
* returns the entry, if it was found, in ppEntry
*
* RETURNS
* TRUE if the entry was found
* FALSE if the entry could not be found
*
*/
static
BOOL
URLCache_FindEntryInHashW
(
LPCURLCACHE_HEADER
pHeader
,
LPCWSTR
lpszUrl
,
CACHEFILE_ENTRY
**
ppEntry
)
static
BOOL
URLCache_FindHashW
(
LPCURLCACHE_HEADER
pHeader
,
LPCWSTR
lpszUrl
,
struct
_HASH_ENTRY
**
ppHashEntry
)
{
struct
_HASH_ENTRY
*
pHashEntry
;
LPSTR
urlA
;
int
url_len
;
BOOL
ret
;
...
...
@@ -1189,8 +1177,7 @@ static BOOL URLCache_FindEntryInHashW(LPCURLCACHE_HEADER pHeader, LPCWSTR lpszUr
return
FALSE
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
lpszUrl
,
-
1
,
urlA
,
url_len
,
NULL
,
NULL
);
if
((
ret
=
URLCache_FindHash
(
pHeader
,
urlA
,
&
pHashEntry
)))
*
ppEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
ret
=
URLCache_FindHash
(
pHeader
,
urlA
,
ppHashEntry
);
HeapFree
(
GetProcessHeap
(),
0
,
urlA
);
return
ret
;
}
...
...
@@ -1441,6 +1428,7 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
LPDWORD
lpdwCacheEntryInfoBufferSize
)
{
LPURLCACHE_HEADER
pHeader
;
struct
_HASH_ENTRY
*
pHashEntry
;
CACHEFILE_ENTRY
*
pEntry
;
URL_CACHEFILE_ENTRY
*
pUrlEntry
;
URLCACHECONTAINER
*
pContainer
;
...
...
@@ -1456,7 +1444,7 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
if
(
!
(
pHeader
=
URLCacheContainer_LockIndex
(
pContainer
)))
return
FALSE
;
if
(
!
URLCache_Find
EntryInHashW
(
pHeader
,
lpszUrl
,
&
p
Entry
))
if
(
!
URLCache_Find
HashW
(
pHeader
,
lpszUrl
,
&
pHash
Entry
))
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
WARN
(
"entry %s not found!
\n
"
,
debugstr_w
(
lpszUrl
));
...
...
@@ -1464,6 +1452,7 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
return
FALSE
;
}
pEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
...
...
@@ -1586,6 +1575,7 @@ BOOL WINAPI SetUrlCacheEntryInfoA(
BOOL
WINAPI
SetUrlCacheEntryInfoW
(
LPCWSTR
lpszUrl
,
LPINTERNET_CACHE_ENTRY_INFOW
lpCacheEntryInfo
,
DWORD
dwFieldControl
)
{
LPURLCACHE_HEADER
pHeader
;
struct
_HASH_ENTRY
*
pHashEntry
;
CACHEFILE_ENTRY
*
pEntry
;
URLCACHECONTAINER
*
pContainer
;
...
...
@@ -1600,7 +1590,7 @@ BOOL WINAPI SetUrlCacheEntryInfoW(LPCWSTR lpszUrl, LPINTERNET_CACHE_ENTRY_INFOW
if
(
!
(
pHeader
=
URLCacheContainer_LockIndex
(
pContainer
)))
return
FALSE
;
if
(
!
URLCache_Find
EntryInHashW
(
pHeader
,
lpszUrl
,
&
p
Entry
))
if
(
!
URLCache_Find
HashW
(
pHeader
,
lpszUrl
,
&
pHash
Entry
))
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
WARN
(
"entry %s not found!
\n
"
,
debugstr_w
(
lpszUrl
));
...
...
@@ -1608,6 +1598,7 @@ BOOL WINAPI SetUrlCacheEntryInfoW(LPCWSTR lpszUrl, LPINTERNET_CACHE_ENTRY_INFOW
return
FALSE
;
}
pEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
...
...
@@ -2975,6 +2966,7 @@ BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLas
BOOL
WINAPI
IsUrlCacheEntryExpiredW
(
LPCWSTR
url
,
DWORD
dwFlags
,
FILETIME
*
pftLastModified
)
{
LPURLCACHE_HEADER
pHeader
;
struct
_HASH_ENTRY
*
pHashEntry
;
CACHEFILE_ENTRY
*
pEntry
;
URL_CACHEFILE_ENTRY
*
pUrlEntry
;
URLCACHECONTAINER
*
pContainer
;
...
...
@@ -2990,7 +2982,7 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
if
(
!
(
pHeader
=
URLCacheContainer_LockIndex
(
pContainer
)))
return
FALSE
;
if
(
!
URLCache_Find
EntryInHashW
(
pHeader
,
url
,
&
p
Entry
))
if
(
!
URLCache_Find
HashW
(
pHeader
,
url
,
&
pHash
Entry
))
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
TRACE
(
"entry %s not found!
\n
"
,
debugstr_w
(
url
));
...
...
@@ -2998,6 +2990,7 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
return
FALSE
;
}
pEntry
=
(
CACHEFILE_ENTRY
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
dwOffsetEntry
);
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
...
...
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