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
0cdca521
Commit
0cdca521
authored
Jan 23, 2019
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Return proper cache path from GetUrlCacheConfigInfo.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
47a44e6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
10 deletions
+81
-10
urlcache.c
dlls/wininet/tests/urlcache.c
+0
-2
urlcache.c
dlls/wininet/urlcache.c
+81
-8
No files found.
dlls/wininet/tests/urlcache.c
View file @
0cdca521
...
...
@@ -1184,10 +1184,8 @@ static void test_GetUrlCacheConfigInfo(void)
SetLastError
(
0xdeadbeef
);
ret
=
GetUrlCacheConfigInfoA
(
td
[
i
].
info
,
NULL
,
td
[
i
].
flags
);
todo_wine
ok
(
ret
==
td
[
i
].
ret
,
"%d: expected %d, got %d
\n
"
,
i
,
td
[
i
].
ret
,
ret
);
if
(
!
ret
)
todo_wine
ok
(
GetLastError
()
==
td
[
i
].
error
,
"%d: expected %u, got %u
\n
"
,
i
,
td
[
i
].
error
,
GetLastError
());
else
{
...
...
dlls/wininet/urlcache.c
View file @
0cdca521
...
...
@@ -23,6 +23,7 @@
*/
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "ws2tcpip.h"
...
...
@@ -3764,21 +3765,93 @@ BOOL WINAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags,
/***********************************************************************
* GetUrlCacheConfigInfoW (WININET.@)
*/
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
CacheInfo
,
LPDWORD
size
,
DWORD
bitmask
)
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
info
,
LPDWORD
size
,
DWORD
flags
)
{
FIXME
(
"(%p, %p, %x)
\n
"
,
CacheInfo
,
size
,
bitmask
);
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
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
))
{
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
);
break
;
case
CACHE_CONFIG_COOKIES_PATHS_FC
:
if
(
container
->
default_entry_type
==
COOKIE_CACHE_ENTRY
)
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
);
break
;
case
CACHE_CONFIG_HISTORY_PATHS_FC
:
if
(
container
->
default_entry_type
==
URLHISTORY_CACHE_ENTRY
)
lstrcpynW
(
info
->
u
.
s
.
CachePath
,
container
->
path
,
MAX_PATH
);
break
;
default:
FIXME
(
"flags %08x not handled
\n
"
,
flags
);
break
;
}
}
TRACE
(
"CachePath %s
\n
"
,
debugstr_w
(
info
->
u
.
s
.
CachePath
));
return
TRUE
;
}
/***********************************************************************
* GetUrlCacheConfigInfoA (WININET.@)
*/
BOOL
WINAPI
GetUrlCacheConfigInfoA
(
LPINTERNET_CACHE_CONFIG_INFOA
CacheInfo
,
LPDWORD
size
,
DWORD
bitmask
)
BOOL
WINAPI
GetUrlCacheConfigInfoA
(
LPINTERNET_CACHE_CONFIG_INFOA
info
,
LPDWORD
size
,
DWORD
flags
)
{
FIXME
(
"(%p, %p, %x)
\n
"
,
CacheInfo
,
size
,
bitmask
);
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
INTERNET_CACHE_CONFIG_INFOW
infoW
;
TRACE
(
"(%p, %p, %x)
\n
"
,
info
,
size
,
flags
);
if
(
!
info
)
{
INTERNET_SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
infoW
.
dwStructSize
=
sizeof
(
infoW
);
if
(
!
GetUrlCacheConfigInfoW
(
&
infoW
,
size
,
flags
))
return
FALSE
;
info
->
dwContainer
=
infoW
.
dwContainer
;
info
->
dwQuota
=
infoW
.
dwQuota
;
info
->
dwReserved4
=
infoW
.
dwReserved4
;
info
->
fPerUser
=
infoW
.
fPerUser
;
info
->
dwSyncMode
=
infoW
.
dwSyncMode
;
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
);
return
TRUE
;
}
BOOL
WINAPI
GetUrlCacheGroupAttributeA
(
GROUPID
gid
,
DWORD
dwFlags
,
DWORD
dwAttributes
,
...
...
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