Commit 1b42c007 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Pass hash entry directly to URLCache_DeleteEntryFromHash.

parent d448a2ad
...@@ -1210,16 +1210,11 @@ static BOOL URLCache_HashEntrySetUse(struct _HASH_ENTRY * pHashEntry, DWORD dwUs ...@@ -1210,16 +1210,11 @@ static BOOL URLCache_HashEntrySetUse(struct _HASH_ENTRY * pHashEntry, DWORD dwUs
* FALSE if the entry could not be found * FALSE if the entry could not be found
* *
*/ */
static BOOL URLCache_DeleteEntryFromHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl) static BOOL URLCache_DeleteEntryFromHash(struct _HASH_ENTRY * pHashEntry)
{ {
struct _HASH_ENTRY * pHashEntry; pHashEntry->dwHashKey = HASHTABLE_FREE;
if (URLCache_FindHash(pHeader, lpszUrl, &pHashEntry)) pHashEntry->dwOffsetEntry = HASHTABLE_FREE;
{ return TRUE;
pHashEntry->dwHashKey = HASHTABLE_FREE;
pHashEntry->dwOffsetEntry = HASHTABLE_FREE;
return TRUE;
}
return FALSE;
} }
/*********************************************************************** /***********************************************************************
...@@ -2597,7 +2592,7 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName) ...@@ -2597,7 +2592,7 @@ BOOL WINAPI DeleteUrlCacheEntryA(LPCSTR lpszUrlName)
pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry);
URLCache_DeleteEntry(pHeader, pEntry); URLCache_DeleteEntry(pHeader, pEntry);
URLCache_DeleteEntryFromHash(pHeader, lpszUrlName); URLCache_DeleteEntryFromHash(pHashEntry);
URLCacheContainer_UnlockIndex(pContainer, pHeader); URLCacheContainer_UnlockIndex(pContainer, pHeader);
...@@ -2656,7 +2651,7 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName) ...@@ -2656,7 +2651,7 @@ BOOL WINAPI DeleteUrlCacheEntryW(LPCWSTR lpszUrlName)
pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry); pEntry = (CACHEFILE_ENTRY *)((LPBYTE)pHeader + pHashEntry->dwOffsetEntry);
URLCache_DeleteEntry(pHeader, pEntry); URLCache_DeleteEntry(pHeader, pEntry);
URLCache_DeleteEntryFromHash(pHeader, urlA); URLCache_DeleteEntryFromHash(pHashEntry);
URLCacheContainer_UnlockIndex(pContainer, pHeader); URLCacheContainer_UnlockIndex(pContainer, pHeader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment