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
99499264
Commit
99499264
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: Pass hash entry directly to URLCache_HashEntrySetUse rather than searching for it again.
parent
601b6835
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
urlcache.c
dlls/wininet/urlcache.c
+5
-10
No files found.
dlls/wininet/urlcache.c
View file @
99499264
...
@@ -1193,15 +1193,10 @@ static BOOL URLCache_FindHashW(LPCURLCACHE_HEADER pHeader, LPCWSTR lpszUrl, stru
...
@@ -1193,15 +1193,10 @@ static BOOL URLCache_FindHashW(LPCURLCACHE_HEADER pHeader, LPCWSTR lpszUrl, stru
* FALSE if the entry could not be found
* FALSE if the entry could not be found
*
*
*/
*/
static
BOOL
URLCache_HashEntrySetUse
(
LPCURLCACHE_HEADER
pHeader
,
LPCSTR
lpszUrl
,
DWORD
dwUseCount
)
static
BOOL
URLCache_HashEntrySetUse
(
struct
_HASH_ENTRY
*
pHashEntry
,
DWORD
dwUseCount
)
{
{
struct
_HASH_ENTRY
*
pHashEntry
;
pHashEntry
->
dwHashKey
=
dwUseCount
|
(
DWORD
)(
pHashEntry
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
if
(
URLCache_FindHash
(
pHeader
,
lpszUrl
,
&
pHashEntry
))
return
TRUE
;
{
pHashEntry
->
dwHashKey
=
dwUseCount
|
(
DWORD
)(
pHashEntry
->
dwHashKey
/
HASHTABLE_NUM_ENTRIES
)
*
HASHTABLE_NUM_ENTRIES
;
return
TRUE
;
}
return
FALSE
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -1672,7 +1667,7 @@ BOOL WINAPI RetrieveUrlCacheEntryFileA(
...
@@ -1672,7 +1667,7 @@ BOOL WINAPI RetrieveUrlCacheEntryFileA(
pUrlEntry
->
dwHitRate
++
;
pUrlEntry
->
dwHitRate
++
;
pUrlEntry
->
dwUseCount
++
;
pUrlEntry
->
dwUseCount
++
;
URLCache_HashEntrySetUse
(
pH
eader
,
lpszUrlName
,
pUrlEntry
->
dwUseCount
);
URLCache_HashEntrySetUse
(
pH
ashEntry
,
pUrlEntry
->
dwUseCount
);
if
(
!
URLCache_CopyEntry
(
pContainer
,
pHeader
,
lpCacheEntryInfo
,
lpdwCacheEntryInfoBufferSize
,
pUrlEntry
,
FALSE
))
if
(
!
URLCache_CopyEntry
(
pContainer
,
pHeader
,
lpCacheEntryInfo
,
lpdwCacheEntryInfoBufferSize
,
pUrlEntry
,
FALSE
))
{
{
...
@@ -1764,7 +1759,7 @@ BOOL WINAPI UnlockUrlCacheEntryFileA(
...
@@ -1764,7 +1759,7 @@ BOOL WINAPI UnlockUrlCacheEntryFileA(
return
FALSE
;
return
FALSE
;
}
}
pUrlEntry
->
dwUseCount
--
;
pUrlEntry
->
dwUseCount
--
;
URLCache_HashEntrySetUse
(
pH
eader
,
lpszUrlName
,
pUrlEntry
->
dwUseCount
);
URLCache_HashEntrySetUse
(
pH
ashEntry
,
pUrlEntry
->
dwUseCount
);
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
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