2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

2815. [bug] Exclusively lock the task when freezing a zone.

[RT #19838]
This commit is contained in:
Evan Hunt
2009-12-23 23:33:09 +00:00
parent f09e6b6025
commit aa3415ba49
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2815. [bug] Exclusively lock the task when freezing a zone.
[RT #19838]
2814. [func] Provide a definitive error message when a master
zone is not loaded. [RT #20757]

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.556 2009/11/28 15:57:36 vjs Exp $ */
/* $Id: server.c,v 1.557 2009/12/23 23:33:09 each Exp $ */
/*! \file */
@@ -6359,6 +6359,8 @@ ns_server_freeze(ns_server_t *server, isc_boolean_t freeze, char *args,
return (DNS_R_NOTMASTER);
}
result = isc_task_beginexclusive(server->task);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
frozen = dns_zone_getupdatedisabled(zone);
if (freeze) {
if (frozen) {
@@ -6398,6 +6400,7 @@ ns_server_freeze(ns_server_t *server, isc_boolean_t freeze, char *args,
}
}
}
isc_task_endexclusive(server->task);
if (msg != NULL && strlen(msg) < isc_buffer_availablelength(text))
isc_buffer_putmem(text, (const unsigned char *)msg,