From 9e4e6342b75761f122b80282334c4d95f38dbd05 Mon Sep 17 00:00:00 2001 From: Andrea Suisani Date: Thu, 12 Jan 2017 23:59:33 +0100 Subject: [PATCH] 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. --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 82bdefd..60cc864 100644 --- a/main.cpp +++ b/main.cpp @@ -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 ips;