]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Another offbyone.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Jun 2007 12:32:16 +0000 (12:32 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 18 Jun 2007 12:32:16 +0000 (12:32 +0000)
git-svn-id: file:///svn/unbound/trunk@393 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
iterator/iterator.c

index 9923f739776597c64f61d05131ac7e2b59da51c9..496a2e3b62bbfa5ddfea911f89a956ff03835ad1 100644 (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
index 97538f1d88b55791ea388a76f0d0e7d1f5a27e42..b31e9dcd39aef2c9bc731b06cfea57d47c94386f 100644 (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;