char *zonefile = conf_zonefile(conf, zone_name);
conf_val_t val = conf_zone_get(conf, C_SEM_CHECKS, zone_name);
- conf_val_t thr = conf_zone_get(conf, C_ADJUST_THR, zone_name);
zloader_t zl;
- int ret = zonefile_open(&zl, zonefile, zone_name, conf_bool(&val), conf_int(&thr), time(NULL));
+ int ret = zonefile_open(&zl, zonefile, zone_name, conf_bool(&val), time(NULL));
free(zonefile);
if (ret != KNOT_EOK) {
return ret;
}
int zonefile_open(zloader_t *loader, const char *source,
- const knot_dname_t *origin, bool semantic_checks,
- unsigned adjusting_threads, time_t time)
+ const knot_dname_t *origin, bool semantic_checks, time_t time)
{
if (!loader) {
return KNOT_EINVAL;
loader->source = strdup(source);
loader->creator = zc;
loader->semantic_checks = semantic_checks;
- loader->adjust_threads = adjusting_threads;
loader->time = time;
return KNOT_EOK;
goto fail;
}
- ret = zone_adjust_contents(zc->z, adjust_cb_flags_and_nsec3, adjust_cb_nsec3_flags, true, true, 1, NULL);
+ ret = zone_adjust_contents(zc->z, adjust_cb_flags_and_nsec3, adjust_cb_nsec3_flags,
+ true, true, 1, NULL);
if (ret != KNOT_EOK) {
ERROR(zname, "failed to finalize zone contents (%s)",
knot_strerror(ret));
/* The contents will now change possibly messing up NSEC3 tree, it will
be adjusted again at zone_update_commit. */
- ret = zone_adjust_contents(zc->z, unadjust_cb_point_to_nsec3, NULL, false, false, loader->adjust_threads, NULL);
+ ret = zone_adjust_contents(zc->z, unadjust_cb_point_to_nsec3, NULL,
+ false, false, 1, NULL);
if (ret != KNOT_EOK) {
ERROR(zname, "failed to finalize zone contents (%s)",
knot_strerror(ret));
typedef struct {
char *source; /*!< Zone source file. */
bool semantic_checks; /*!< Do semantic checks. */
- unsigned adjust_threads; /*!< Parallelize adjusting. */
sem_handler_t *err_handler; /*!< Semantic checks error handler. */
zcreator_t *creator; /*!< Loader context. */
zs_scanner_t scanner; /*!< Zone scanner. */
* \param source Source file name.
* \param origin Zone origin.
* \param semantic_checks Perform semantic checks.
- * \param adjusting_threads Paralellize adjusting.
* \param time Time for semantic check.
*
* \retval Initialized loader on success.
* \retval NULL on error.
*/
int zonefile_open(zloader_t *loader, const char *source,
- const knot_dname_t *origin, bool semantic_checks,
- unsigned adjusting_threads, time_t time);
+ const knot_dname_t *origin, bool semantic_checks, time_t time);
/*!
* \brief Loads zone from a zone file.
};
zloader_t zl;
- int ret = zonefile_open(&zl, zone_file, zone_name, true, 1, time);
+ int ret = zonefile_open(&zl, zone_file, zone_name, true, time);
if (ret != KNOT_EOK) {
return ret;
}