2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

remove also-notify empty checks.

This commit is contained in:
Mark Andrews 2002-01-23 01:51:16 +00:00
parent 5804bf8118
commit de619d1e81

View File

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check.c,v 1.15 2002/01/21 11:00:14 bwelling Exp $ */
/* $Id: check.c,v 1.16 2002/01/23 01:51:16 marka Exp $ */
#include <config.h>
@ -57,7 +57,7 @@ typedef struct {
} intervaltable;
static isc_result_t
check_options(cfg_obj_t *options, isc_log_t *logctx, isc_boolean_t toplevel) {
check_options(cfg_obj_t *options, isc_log_t *logctx) {
isc_result_t result = ISC_R_SUCCESS;
unsigned int i;
cfg_obj_t *obj = NULL;
@ -98,28 +98,6 @@ check_options(cfg_obj_t *options, isc_log_t *logctx, isc_boolean_t toplevel) {
result = ISC_R_RANGE;
}
}
obj = NULL;
(void)cfg_map_get(options, "also-notify", &obj);
if (obj != NULL) {
cfg_obj_t *addrlist = NULL;
cfg_obj_t *port = NULL;
addrlist = cfg_tuple_get(obj, "addresses");
port = cfg_tuple_get(obj, "port");
if (cfg_list_first(addrlist) == NULL) {
if (toplevel) {
cfg_obj_log(options, logctx, ISC_LOG_ERROR,
"empty 'also-notify' entry");
if (result == ISC_R_SUCCESS)
result = ISC_R_FAILURE;
} else if (cfg_obj_isuint32(port)) {
cfg_obj_log(options, logctx, ISC_LOG_ERROR,
"port specified with "
"empty 'also-notify'");
if (result == ISC_R_SUCCESS)
result = ISC_R_FAILURE;
}
}
}
return (result);
}
@ -358,7 +336,7 @@ check_zoneconf(cfg_obj_t *zconfig, isc_symtab_t *symtab,
/*
* Check various options.
*/
tresult = check_options(zoptions, logctx, ISC_FALSE);
tresult = check_options(zoptions, logctx);
if (tresult != ISC_R_SUCCESS)
result = tresult;
@ -498,9 +476,9 @@ check_viewconf(cfg_obj_t *config, cfg_obj_t *vconfig, dns_rdataclass_t vclass,
}
if (vconfig != NULL)
tresult = check_options(vconfig, logctx, ISC_FALSE);
tresult = check_options(vconfig, logctx);
else
tresult = check_options(config, logctx, ISC_TRUE);
tresult = check_options(config, logctx);
if (tresult != ISC_R_SUCCESS)
result = tresult;
@ -520,7 +498,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
(void)cfg_map_get(config, "options", &options);
if (options != NULL &&
check_options(options, logctx, ISC_TRUE) != ISC_R_SUCCESS)
check_options(options, logctx) != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
(void)cfg_map_get(config, "view", &views);