]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 17 Oct 2000 18:48:09 +0000 (18:48 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 17 Oct 2000 18:48:09 +0000 (18:48 +0000)
 515.   [bug]           The ssu table was not beinge attached / detached
                        by dns_zone_[sg]etssutable.  [RT#397]

CHANGES
bin/named/update.c
lib/dns/zone.c
lib/dns/zoneconf.c

diff --git a/CHANGES b/CHANGES
index e1e48fd2c6041c58a18508e2dbdf67cbedc28429..46c06d70298ba1a2d117c6b6a2627f04360c8b3b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -18,6 +18,9 @@
                        DNAME, would trigger an INSIST(!search.need_cleanup)
                        assertion. [RT #399]
 
+ 515.  [bug]           The ssu table was not being attached / detached
+                       by dns_zone_[sg]etssutable. [RT#397]
+
  511.  [bug]           The message code could throw an assertion on an
                        out of memory failure. [RT #392]
 
index fa3289da75533e7811d417ea1c360d1c656f31ef..fe36e252c691b72eeff36e9621c7239a8a7dd648 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: update.c,v 1.58 2000/06/22 21:49:37 tale Exp $ */
+/* $Id: update.c,v 1.58.2.1 2000/10/17 18:48:09 gson Exp $ */
 
 #include <config.h>
 
@@ -2347,6 +2347,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
        if (db != NULL)
                dns_db_detach(&db);
 
+       if (ssutable != NULL)
+               dns_ssutable_detach(&ssutable);
+
        if (zone != NULL)
                dns_zone_detach(&zone);
 
index a3bd6c522e476623e6e799e6a908a33f92af42b6..552d4749eec807e3334b61252ce462ed75effa4b 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.152.2.13 2000/09/21 10:10:05 marka Exp $ */
+/* $Id: zone.c,v 1.152.2.14 2000/10/17 18:48:05 gson Exp $ */
 
 #include <config.h>
 
@@ -3829,14 +3829,23 @@ dns_zone_getssutable(dns_zone_t *zone, dns_ssutable_t **table) {
        REQUIRE(DNS_ZONE_VALID(zone));
        REQUIRE(table != NULL);
        REQUIRE(*table == NULL);
-       *table = zone->ssutable;
+
+       LOCK(&zone->lock);
+       if (zone->ssutable != NULL)
+               dns_ssutable_attach(zone->ssutable, table);
+       UNLOCK(&zone->lock);
 }
 
 void
 dns_zone_setssutable(dns_zone_t *zone, dns_ssutable_t *table) {
        REQUIRE(DNS_ZONE_VALID(zone));
-       REQUIRE(table != NULL);
-       zone->ssutable = table;
+
+       LOCK(&zone->lock);
+       if (zone->ssutable != NULL)
+               dns_ssutable_detach(&zone->ssutable);
+       if (table != NULL)
+               dns_ssutable_attach(table, &zone->ssutable);
+       UNLOCK(&zone->lock);
 }
 
 void
index b3bbcc580bf1233c2a4fb834d989a1c22533b5e7..55699cf9f5c223e750cfe150c5f956d1773df107 100644 (file)
@@ -15,7 +15,7 @@
  * SOFTWARE.
  */
 
-/* $Id: zoneconf.c,v 1.43.2.1 2000/07/25 22:47:35 gson Exp $ */
+/* $Id: zoneconf.c,v 1.43.2.2 2000/10/17 18:48:07 gson Exp $ */
 
 #include <config.h>
 
@@ -240,15 +240,9 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
                                          dns_zone_setupdateacl,
                                          dns_zone_clearupdateacl));
 
-               dns_zone_getssutable(zone, &ssutable);
-               if (ssutable != NULL)
-                       dns_ssutable_detach(&ssutable);
                result = dns_c_zone_getssuauth(czone, &ssutable);
-               if (result == ISC_R_SUCCESS) {
-                       dns_ssutable_t *newssutable = NULL;
-                       dns_ssutable_attach(ssutable, &newssutable);
-                       dns_zone_setssutable(zone, newssutable);
-               }
+               if (result == ISC_R_SUCCESS)
+                       dns_zone_setssutable(zone, ssutable);
 
                result = dns_c_zone_getsigvalidityinterval(czone, &uintval);
                if (result != ISC_R_SUCCESS && cview != NULL)