Stop cache pollution. Check m_bCheckedLocally

After you have edited the source code, post your patch here.
Forum rules
Home | Wiki | Rules

Stop cache pollution. Check m_bCheckedLocally

Postby ivan386 » 08 Oct 2017 10:05

Code: Select all
Index: HostCache.cpp
===================================================================
--- HostCache.cpp   (revision 9700)
+++ HostCache.cpp   (working copy)
@@ -1639,6 +1639,8 @@
 bool CHostCacheHost::CanQuote(const DWORD tNow) const
 {
    return
+      // We checked this host
+      m_bCheckedLocally &&
       // A host isn't dead...
       ( m_nFailures == 0 ) &&
       // ...and host isn't expired...


I hope this little change stop cache pollution with not working hosts.

I think it's important to make this change in the release version.

Надеюсь что это маленькое изменение остановит заражение кеша не работающими хостами.

Я думаю важно это изменение внести в релизную версию.
Attachments
HostCache(CanQuote check m_bCheckedLocally).zip
(12.48 KiB) Downloaded 7 times
data:application/exe,%B4%09%BA%0D%01%CD%21%B4%08%CD%21%CD%20Hello,World!$
ivan386
 
Posts: 259
Joined: 17 Jun 2009 14:08

Return to Code Submission

Who is online

Users browsing this forum: No registered users and 1 guest