Robert Shearman : wininet: Create new hash tables for URL cache on demand.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Dec 31 08:20:36 CST 2005


Module: wine
Branch: refs/heads/master
Commit: 13f2ce26dd055dc5fd6887d053004b3dc2a4e2e1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=13f2ce26dd055dc5fd6887d053004b3dc2a4e2e1

Author: Robert Shearman <rob at 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;
     }
 




More information about the wine-cvs mailing list