From: Grigorii Demidov Date: Tue, 28 Feb 2017 09:47:05 +0000 (+0100) Subject: tests: sync deckard; cleanup X-Git-Tag: v1.3.0~23^2~71^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47e8bb34fa43fe928fcd2625f3715ef57f8475ff;p=thirdparty%2Fknot-resolver.git tests: sync deckard; cleanup --- diff --git a/lib/utils.c b/lib/utils.c index af1b4dbd8..a60b62438 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -502,7 +502,7 @@ int kr_ranked_rrarray_set_wire(ranked_rr_array_t *array, bool to_wire, continue; } entry->to_wire = to_wire; - if (!check_dups) { + if (!to_wire || !check_dups) { continue; } knot_rrset_t *rr = entry->rr; @@ -517,7 +517,7 @@ int kr_ranked_rrarray_set_wire(ranked_rr_array_t *array, bool to_wire, } bool is_equal = knot_rrset_equal(rr, stashed->rr, KNOT_RRSET_COMPARE_WHOLE); - if (is_equal && to_wire) { + if (is_equal) { stashed->to_wire = false; } } diff --git a/lib/utils.h b/lib/utils.h index e2224413e..ef1c1bc6f 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -193,6 +193,14 @@ int kr_rrarray_add(rr_array_t *array, const knot_rrset_t *rr, knot_mm_t *pool); int kr_ranked_rrarray_add(ranked_rr_array_t *array, const knot_rrset_t *rr, uint8_t rank, bool to_wire, uint32_t qry_uid, knot_mm_t *pool); +/** @internal Mark the RRSets from particular query as + * "have (not) to be recorded in the final answer". + * @param array RRSet array. + * @param to_wire Records must be\must not be recorded in final answer. + * @param qry_uid Query uid. + * @param check_dups When to_wire is true, try to avoid duplicate RRSets. + * @return 0 or an error + */ int kr_ranked_rrarray_set_wire(ranked_rr_array_t *array, bool to_wire, uint32_t qry_uid, bool check_dups); diff --git a/tests/deckard b/tests/deckard index 231232783..b7453577c 160000 --- a/tests/deckard +++ b/tests/deckard @@ -1 +1 @@ -Subproject commit 23123278300caac55c0cccfeccc96267246b0993 +Subproject commit b7453577c57cb837261ca6e21098b8a44a9e8b3d