Commit b82dd3ea authored by Dominik Taborsky's avatar Dominik Taborsky

zone_update: cleanup, renaming, details

parent 72373bc0
This diff is collapsed.
...@@ -43,11 +43,11 @@ typedef struct { ...@@ -43,11 +43,11 @@ typedef struct {
typedef struct { typedef struct {
zone_update_t *update; /*!< The update we're iterating over. */ zone_update_t *update; /*!< The update we're iterating over. */
hattrie_iter_t *t_it; /*!< Iterator for the original zone in the case of INCREMENTAL update or the new zone in case of FULL update. */ hattrie_iter_t *base_it; /*!< Iterator for the original zone in the case of INCREMENTAL update or the new zone in case of FULL update. */
hattrie_iter_t *add_it; /*!< Iterator for the added nodes in the changeset. Available in the INCREMENTAL update only. */ hattrie_iter_t *add_it; /*!< Iterator for the added nodes in the changeset. Available in the INCREMENTAL update only. */
const zone_node_t *t_node; /*!< The original node (INCREMENTAL update) or new node (FULL update). */ const zone_node_t *base_node; /*!< The original node (INCREMENTAL update) or new node (FULL update). */
const zone_node_t *add_node; /*!< The additions to that node (INCREMENTAL update only). */ const zone_node_t *add_node; /*!< The additions to that node (INCREMENTAL update only). */
const zone_node_t *next_n; /*!< The smaller of t_node and ch_node (INCREMENTAL update) or next new node (FULL update). */ const zone_node_t *next_node; /*!< The smaller of t_node and ch_node (INCREMENTAL update) or next new node (FULL update). */
bool nsec3; /*!< Set when we're using the NSEC3 node tree. */ bool nsec3; /*!< Set when we're using the NSEC3 node tree. */
} zone_update_iter_t; } zone_update_iter_t;
......
...@@ -566,7 +566,6 @@ static int remove_rr(zone_contents_t *z, const knot_rrset_t *rr, ...@@ -566,7 +566,6 @@ static int remove_rr(zone_contents_t *z, const knot_rrset_t *rr,
return KNOT_EOUTOFZONE; return KNOT_EOUTOFZONE;
} }
int ret = KNOT_EOK;
zone_node_t *node; zone_node_t *node;
if (*n == NULL) { if (*n == NULL) {
node = nsec3 ? get_nsec3_node(z, rr->owner) : get_node(z, rr->owner); node = nsec3 ? get_nsec3_node(z, rr->owner) : get_node(z, rr->owner);
...@@ -579,7 +578,7 @@ static int remove_rr(zone_contents_t *z, const knot_rrset_t *rr, ...@@ -579,7 +578,7 @@ static int remove_rr(zone_contents_t *z, const knot_rrset_t *rr,
knot_rdataset_t *node_rrs = node_rdataset(node, rr->type); knot_rdataset_t *node_rrs = node_rdataset(node, rr->type);
// Subtract changeset RRS from node RRS. // Subtract changeset RRS from node RRS.
ret = knot_rdataset_subtract(node_rrs, &rr->rrs, NULL); int ret = knot_rdataset_subtract(node_rrs, &rr->rrs, NULL);
if (ret != KNOT_EOK) { if (ret != KNOT_EOK) {
return ret; return ret;
} }
......
...@@ -217,9 +217,7 @@ int main(int argc, char *argv[]) ...@@ -217,9 +217,7 @@ int main(int argc, char *argv[])
plan_lazy(); plan_lazy();
/* Load test configuration. */ /* Load test configuration. */
const char *conf_str = "server:\n identity: bogus.ns\n version: 0.11\n nsid: \n" const char *conf_str = "zone:\n - domain: test.\n storage: /tmp\n";
"zone:\n - domain: test.\n zonefile-sync: -1\n"
" storage: /tmp\n";
int ret = test_conf(conf_str, NULL); int ret = test_conf(conf_str, NULL);
if (ret != KNOT_EOK) { if (ret != KNOT_EOK) {
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment