ns_server_flushonshutdown() now takes a boolean flag saying whether to flush

or not.  This is in preperation for server option to set the default.
This commit is contained in:
Mark Andrews 2000-10-05 23:48:49 +00:00
parent cb5d33b87a
commit 7e4135abb9
3 changed files with 13 additions and 8 deletions

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.h,v 1.38 2000/10/05 10:42:39 marka Exp $ */
/* $Id: server.h,v 1.39 2000/10/05 23:48:49 marka Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
@ -95,7 +95,7 @@ ns_server_reloadwanted(ns_server_t *server);
*/
void
ns_server_flushonshutdown(ns_server_t *server);
ns_server_flushonshutdown(ns_server_t *server, isc_boolean_t flush);
/*
* Inform the server that the zones should be flushed to disk on shutdown.
*/

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: omapi.c,v 1.17 2000/10/05 10:42:35 marka Exp $ */
/* $Id: omapi.c,v 1.18 2000/10/05 23:48:47 marka Exp $ */
/*
* Principal Author: DCL
@ -81,12 +81,14 @@ control_setvalue(omapi_object_t *handle, omapi_string_t *name,
result = ISC_R_SUCCESS;
} else if (omapi_string_strcmp(name,NS_OMAPI_COMMAND_HALT) == 0) {
if (omapi_data_getint(value) != 0)
if (omapi_data_getint(value) != 0) {
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
isc_app_shutdown();
}
result = ISC_R_SUCCESS;
} else if (omapi_string_strcmp(name,NS_OMAPI_COMMAND_STOP) == 0) {
if (omapi_data_getint(value) != 0) {
ns_server_flushonshutdown(ns_g_server);
ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
isc_app_shutdown();
}
result = ISC_R_SUCCESS;

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.225 2000/10/05 10:42:36 marka Exp $ */
/* $Id: server.c,v 1.226 2000/10/05 23:48:45 marka Exp $ */
#include <config.h>
@ -1669,8 +1669,11 @@ run_server(isc_task_t *task, isc_event_t *event) {
}
void
ns_server_flushonshutdown(ns_server_t *server) {
server->flushonshutdown = ISC_TRUE;
ns_server_flushonshutdown(ns_server_t *server, isc_boolean_t flush) {
REQUIRE(NS_SERVER_VALID(server));
server->flushonshutdown = flush;
}
static void