Mgr: If network activity is suspended, don't retrieve URL references within notices unless they are already in our cache or in the Windows cache

This commit is contained in:
Charlie Fenton 2012-12-21 02:33:29 -08:00 committed by Oliver Bock
parent 09ff603a13
commit a78f458ca2
1 changed files with 6 additions and 2 deletions

View File

@ -533,8 +533,12 @@ wxFSFile* CBOINCInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wx
// or if the result is already in the Windows internet cache
bool CanUseWinInet = true;
if ((!retval) && status.network_suspend_reason) {
INTERNET_CACHE_ENTRY_INFO cache_info;
if (!GetUrlCacheEntryInfo(right.c_str(), sizeof(cache_info))) {
unsigned char cache_info[2048];
DWORD len = sizeof(cache_info);
if (!GetUrlCacheEntryInfo(right.c_str(),
(LPINTERNET_CACHE_ENTRY_INFO)cache_info,
&len)
) {
CanUseWinInet = false;
}
}