Small off by one in targetcount and double-callback fixup.

git-svn-id: file:///svn/unbound/trunk@389 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2007-06-15 08:40:30 +00:00
parent c7b302f43a
commit 7608c92bb7
3 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -940,7 +940,7 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq,
/* if maxtargets is negative, there is no maximum,
* otherwise only query for ntarget names. */
if(maxtargets > 0 && ++target_count > maxtargets)
if(maxtargets >= 0 && ++target_count > maxtargets)
break;
}
*num = query_count;