Unverified Commit 9e4e6342 authored by Andrea Suisani's avatar Andrea Suisani
Browse files

thisflag should be declared as FlagSpecificData reference

With the current code there's now way that the seeder
returns peers addresses upon dns requests.

Thanks to @gandrewstone for good catch.
parent d5764c91
......@@ -217,7 +217,7 @@ public:
nets[NET_IPV6] = true;
}
time_t now = time(NULL);
FlagSpecificData thisflag = perflag[requestedFlags];
FlagSpecificData& thisflag = perflag[requestedFlags];
thisflag.cacheHits++;
if (force || thisflag.cacheHits * 400 > (thisflag.cache.size()*thisflag.cache.size()) || (thisflag.cacheHits*thisflag.cacheHits * 20 > thisflag.cache.size() && (now - thisflag.cacheTime > 5))) {
set<CNetAddr> ips;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment