From a78f458ca20130d34a4eb7ca2d3f5024628e7525 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 21 Dec 2012 02:33:29 -0800 Subject: [PATCH] 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 --- clientgui/BOINCInternetFSHandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clientgui/BOINCInternetFSHandler.cpp b/clientgui/BOINCInternetFSHandler.cpp index ecccd20588..43635fdd24 100755 --- a/clientgui/BOINCInternetFSHandler.cpp +++ b/clientgui/BOINCInternetFSHandler.cpp @@ -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; } }