Module: wine Branch: refs/heads/master Commit: 13f2ce26dd055dc5fd6887d053004b3dc2a4e2e1 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=13f2ce26dd055dc5fd6887d0...
Author: Robert Shearman rob@codeweavers.com Date: Sat Dec 31 13:20:54 2005 +0100
wininet: Create new hash tables for URL cache on demand.
---
dlls/wininet/urlcache.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index a19c54a..d12bb5a 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -1233,7 +1233,7 @@ static BOOL URLCache_DeleteEntryFromHash * FALSE if the entry could not be added * */ -static BOOL URLCache_AddEntryToHash(LPCURLCACHE_HEADER pHeader, LPCSTR lpszUrl, DWORD dwOffsetEntry) +static BOOL URLCache_AddEntryToHash(LPURLCACHE_HEADER pHeader, LPCSTR lpszUrl, DWORD dwOffsetEntry) { /* see URLCache_FindEntryInHash for structure of hash tables */
@@ -1272,8 +1272,13 @@ static BOOL URLCache_AddEntryToHash(LPCU } } } - FIXME("need to create another hash table\n"); - return FALSE; + pHashEntry = URLCache_CreateHashTable(pHeader, pHashEntry); + if (!pHashEntry) + return FALSE; + + pHashEntry->HashTable[offset].dwHashKey = key; + pHashEntry->HashTable[offset].dwOffsetEntry = dwOffsetEntry; + return TRUE; }
static HASH_CACHEFILE_ENTRY *URLCache_CreateHashTable(LPURLCACHE_HEADER pHeader, HASH_CACHEFILE_ENTRY *pPrevHash) @@ -2149,6 +2154,7 @@ static BOOL WINAPI CommitUrlCacheEntryIn { URLCacheContainer_UnlockIndex(pContainer, pHeader); ERR("no free entries\n"); + SetLastError(ERROR_DISK_FULL); return FALSE; }