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
dab1f7c3
Commit
dab1f7c3
authored
Apr 05, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Return error code in URLCache_FindFirstFreeEntry function.
parent
4254bdbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
urlcache.c
dlls/wininet/urlcache.c
+10
-17
No files found.
dlls/wininet/urlcache.c
View file @
dab1f7c3
...
...
@@ -786,11 +786,11 @@ static inline void URLCache_Allocation_BlockAllocate(BYTE * AllocationTable, DWO
* sets ppEntry to point to it.
*
* RETURNS
*
TRUE if it had enough space
*
FALSE if it couldn't find enough space
*
ERROR_SUCCESS when free memory block was found
*
Any other Win32 error code if the entry could not be added
*
*/
static
BOOL
URLCache_FindFirstFreeEntry
(
URLCACHE_HEADER
*
pHeader
,
DWORD
dwBlocksNeeded
,
CACHEFILE_ENTRY
**
ppEntry
)
static
DWORD
URLCache_FindFirstFreeEntry
(
URLCACHE_HEADER
*
pHeader
,
DWORD
dwBlocksNeeded
,
CACHEFILE_ENTRY
**
ppEntry
)
{
LPBYTE
AllocationTable
=
(
LPBYTE
)
pHeader
+
ALLOCATION_TABLE_OFFSET
;
DWORD
dwBlockNumber
;
...
...
@@ -814,11 +814,11 @@ static BOOL URLCache_FindFirstFreeEntry(URLCACHE_HEADER * pHeader, DWORD dwBlock
for
(
index
=
0
;
index
<
dwBlocksNeeded
*
BLOCKSIZE
/
sizeof
(
DWORD
);
index
++
)
((
DWORD
*
)
*
ppEntry
)[
index
]
=
0xdeadbeef
;
(
*
ppEntry
)
->
dwBlocksUsed
=
dwBlocksNeeded
;
return
TRUE
;
return
ERROR_SUCCESS
;
}
}
FIXME
(
"Grow file
\n
"
);
return
FALSE
;
return
ERROR_HANDLE_DISK_FULL
;
}
/***********************************************************************
...
...
@@ -1381,14 +1381,11 @@ static DWORD URLCache_AddEntryToHash(LPURLCACHE_HEADER pHeader, LPCSTR lpszUrl,
*/
static
DWORD
URLCache_CreateHashTable
(
LPURLCACHE_HEADER
pHeader
,
HASH_CACHEFILE_ENTRY
*
pPrevHash
,
HASH_CACHEFILE_ENTRY
**
ppHash
)
{
DWORD
dwOffset
;
DWORD
dwOffset
,
error
;
int
i
;
if
(
!
URLCache_FindFirstFreeEntry
(
pHeader
,
0x20
,
(
CACHEFILE_ENTRY
**
)
ppHash
))
{
FIXME
(
"no free space for hash table
\n
"
);
return
ERROR_DISK_FULL
;
}
if
((
error
=
URLCache_FindFirstFreeEntry
(
pHeader
,
0x20
,
(
CACHEFILE_ENTRY
**
)
ppHash
))
!=
ERROR_SUCCESS
)
return
error
;
dwOffset
=
(
BYTE
*
)
*
ppHash
-
(
BYTE
*
)
pHeader
;
...
...
@@ -2755,12 +2752,8 @@ static BOOL CommitUrlCacheEntryInternal(
dwBytesNeeded
+=
BLOCKSIZE
;
}
if
(
!
URLCache_FindFirstFreeEntry
(
pHeader
,
dwBytesNeeded
/
BLOCKSIZE
,
&
pEntry
))
{
ERR
(
"no free entries
\n
"
);
error
=
ERROR_DISK_FULL
;
if
((
error
=
URLCache_FindFirstFreeEntry
(
pHeader
,
dwBytesNeeded
/
BLOCKSIZE
,
&
pEntry
))
!=
ERROR_SUCCESS
)
goto
cleanup
;
}
/* FindFirstFreeEntry fills in blocks used */
pUrlEntry
=
(
URL_CACHEFILE_ENTRY
*
)
pEntry
;
...
...
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