]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1649. [bug] Silence "unexpected non-minimal diff" message.
authorMark Andrews <marka@isc.org>
Fri, 4 Jun 2004 03:45:15 +0000 (03:45 +0000)
committerMark Andrews <marka@isc.org>
Fri, 4 Jun 2004 03:45:15 +0000 (03:45 +0000)
                        [RT #11206]

CHANGES
bin/named/update.c

diff --git a/CHANGES b/CHANGES
index d42a0843616c481c7bc69ce460f8c99c11670a1a..a9f897069f23952ac118bee57046e9ebd9d3074a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1649.  [bug]           Silence "unexpected non-minimal diff" message.
+                       [RT #11206]
+
 1646.  [bug]           win32: logging file versions didn't work with
                        non-UNC filenames.  [RT#11486]
 
index b884f61a00d5204f9bce43e3d2b8786c58b9afab..3f00d43ddd734113bda9f578bcd620189f99068c 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: update.c,v 1.88.2.9 2004/05/12 06:39:11 marka Exp $ */
+/* $Id: update.c,v 1.88.2.10 2004/06/04 03:45:15 marka Exp $ */
 
 #include <config.h>
 
@@ -1027,14 +1027,16 @@ add_rr_prepare_action(void *data, rr_t *rr) {
        isc_result_t result = ISC_R_SUCCESS;    
        add_rr_prepare_ctx_t *ctx = data;
        dns_difftuple_t *tuple = NULL;
+       isc_boolean_t equal;
 
        /*
         * If the update RR is a "duplicate" of the update RR,
         * the update should be silently ignored.
         */
-       if (dns_rdata_compare(&rr->rdata, ctx->update_rr) == 0 &&
-           rr->ttl == ctx->update_rr_ttl) {
+       equal = ISC_TF(dns_rdata_compare(&rr->rdata, ctx->update_rr) == 0);
+       if (equal && rr->ttl == ctx->update_rr_ttl) {
                ctx->ignore_add = ISC_TRUE;
+               return (ISC_R_SUCCESS);
        }
 
        /*
@@ -1062,12 +1064,14 @@ add_rr_prepare_action(void *data, rr_t *rr) {
                                           &rr->rdata,
                                           &tuple));
                dns_diff_append(&ctx->del_diff, &tuple);
-               CHECK(dns_difftuple_create(ctx->add_diff.mctx,
-                                          DNS_DIFFOP_ADD, ctx->name,
-                                          ctx->update_rr_ttl,
-                                          &rr->rdata,
-                                          &tuple));
-               dns_diff_append(&ctx->add_diff, &tuple);
+               if (!equal) {
+                       CHECK(dns_difftuple_create(ctx->add_diff.mctx,
+                                                  DNS_DIFFOP_ADD, ctx->name,
+                                                  ctx->update_rr_ttl,
+                                                  &rr->rdata,
+                                                  &tuple));
+                       dns_diff_append(&ctx->add_diff, &tuple);
+               }
        }
  failure:
        return (result);