* 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>
} 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;
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);
}
/*
* Check various options.
*/
- tresult = check_options(zoptions, logctx, ISC_FALSE);
+ tresult = check_options(zoptions, logctx);
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
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;
(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);