fix small bug in the percentage estimation optimization

This commit is contained in:
ps 2011-06-27 10:44:45 +00:00
parent 2dde08953a
commit 5d739b4993
1 changed files with 1 additions and 1 deletions

View File

@ -488,7 +488,7 @@ bool Utils::listed_on_dns_lists(list<string>& dns_domains,unsigned char percenta
}
//if we have checked a number of lists that make it impossible for this function
//to return true, then return false
if((checked_lists*100/number_of_lists)>100-percentage)
if(((times_listed+(number_of_lists-checked_lists))*100/number_of_lists)>=percentage)
{
LINF("ip " + ip + " listed on " + Utils::ulongtostr(times_listed) + " out of " + Utils::ulongtostr(checked_lists) + " checked servers, out of " + Utils::ulongtostr(number_of_lists) + ". threshold is " + Utils::ulongtostr(percentage) + "% -> return false");
return false;