Another offbyone.

git-svn-id: file:///svn/unbound/trunk@393 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-06-18 12:32:16 +00:00
parent 605d2dd751
commit 1a629da2c3
2 changed files with 3 additions and 1 deletions

View file

@ -1,6 +1,7 @@
18 June 2007: Wouter
- same, move subqueries to slumber list when first has resolved.
- fixup last fix for duplicate callbacks.
- another offbyone in targetcounter. Also in Java prototype by the way.
15 June 2007: Wouter
- if a query asks to be notified of the same serviced query result

View file

@ -897,6 +897,7 @@ query_for_targets(struct module_qstate* qstate, struct iter_qstate* iq,
int query_count = 0;
int target_count = 0;
struct delegpt_ns* ns = iq->dp->nslist;
log_assert(maxtargets != 0); /* that would not be useful */
/* Generate target requests. Basically, any missing targets
* are queried for here, regardless if it is necessary to do
@ -940,7 +941,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;