Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca29ac46
Commit
ca29ac46
authored
Jan 28, 2019
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Make GetUrlCacheConfigInfo() return actual dwQuota and dwCacheSize.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8a2347ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
28 deletions
+43
-28
urlcache.c
dlls/wininet/urlcache.c
+43
-28
No files found.
dlls/wininet/urlcache.c
View file @
ca29ac46
...
...
@@ -3762,33 +3762,10 @@ BOOL WINAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags,
return
FALSE
;
}
/***********************************************************************
* GetUrlCacheConfigInfoW (WININET.@)
*/
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
info
,
LPDWORD
size
,
DWORD
flags
)
static
cache_container
*
find_container
(
DWORD
flags
)
{
cache_container
*
container
;
FIXME
(
"(%p, %p, %x): semi-stub
\n
"
,
info
,
size
,
flags
);
if
(
!
info
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
info
->
dwContainer
=
0
;
info
->
dwQuota
=
0x3e800
;
/* FIXME */
info
->
dwReserved4
=
0
;
info
->
fPerUser
=
TRUE
;
info
->
dwSyncMode
=
0
;
info
->
dwNumCachePaths
=
1
;
info
->
dwNormalUsage
=
0
;
info
->
dwExemptUsage
=
0
;
info
->
u
.
s
.
CachePath
[
0
]
=
0
;
info
->
u
.
s
.
dwCacheSize
=
0x3e800
;
/* FIXME */
LIST_FOR_EACH_ENTRY
(
container
,
&
UrlContainers
,
cache_container
,
entry
)
{
switch
(
flags
&
(
CACHE_CONFIG_CONTENT_PATHS_FC
|
CACHE_CONFIG_COOKIES_PATHS_FC
|
CACHE_CONFIG_HISTORY_PATHS_FC
))
...
...
@@ -3796,17 +3773,17 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD s
case
0
:
case
CACHE_CONFIG_CONTENT_PATHS_FC
:
if
(
container
->
default_entry_type
==
NORMAL_CACHE_ENTRY
)
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
)
;
return
container
;
break
;
case
CACHE_CONFIG_COOKIES_PATHS_FC
:
if
(
container
->
default_entry_type
==
COOKIE_CACHE_ENTRY
)
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
)
;
return
container
;
break
;
case
CACHE_CONFIG_HISTORY_PATHS_FC
:
if
(
container
->
default_entry_type
==
URLHISTORY_CACHE_ENTRY
)
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
)
;
return
container
;
break
;
default:
...
...
@@ -3815,6 +3792,45 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD s
}
}
return
NULL
;
}
/***********************************************************************
* GetUrlCacheConfigInfoW (WININET.@)
*/
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
info
,
LPDWORD
size
,
DWORD
flags
)
{
cache_container
*
container
;
DWORD
error
;
FIXME
(
"(%p, %p, %x): semi-stub
\n
"
,
info
,
size
,
flags
);
if
(
!
info
||
!
(
container
=
find_container
(
flags
)))
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
error
=
cache_container_open_index
(
container
,
MIN_BLOCK_NO
);
if
(
error
!=
ERROR_SUCCESS
)
{
INTERNET_SetLastError
(
error
);
return
FALSE
;
}
info
->
dwContainer
=
0
;
info
->
dwQuota
=
FILE_SIZE
(
MAX_BLOCK_NO
)
/
1024
;
info
->
dwReserved4
=
0
;
info
->
fPerUser
=
TRUE
;
info
->
dwSyncMode
=
0
;
info
->
dwNumCachePaths
=
1
;
info
->
dwNormalUsage
=
0
;
info
->
dwExemptUsage
=
0
;
info
->
u
.
s
.
dwCacheSize
=
container
->
file_size
/
1024
;
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
);
cache_container_close_index
(
container
);
TRACE
(
"CachePath %s
\n
"
,
debugstr_w
(
info
->
u
.
s
.
CachePath
));
return
TRUE
;
...
...
@@ -3847,7 +3863,6 @@ BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA info, LPDWORD s
info
->
dwNumCachePaths
=
infoW
.
dwNumCachePaths
;
info
->
dwNormalUsage
=
infoW
.
dwNormalUsage
;
info
->
dwExemptUsage
=
infoW
.
dwExemptUsage
;
info
->
u
.
s
.
dwCacheSize
=
infoW
.
u
.
s
.
dwCacheSize
;
WideCharToMultiByte
(
CP_ACP
,
0
,
infoW
.
u
.
s
.
CachePath
,
-
1
,
info
->
u
.
s
.
CachePath
,
MAX_PATH
,
NULL
,
NULL
);
...
...
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