Commit 74a67c0d authored by Jan Kadlec's avatar Jan Kadlec

Assert disabled, + setting owne nodes to NULL.

parent 1a23d066
......@@ -2948,6 +2948,7 @@ dbg_xfrin_exec_detail(
dbg_xfrin("Failed to remove node from zone!\n");
return KNOT_ENONODE;
}
zone_node->owner->node = NULL;
free(zone_node);
changes->old_nodes[i] = NULL;
}
......@@ -2969,6 +2970,7 @@ dbg_xfrin_exec_detail(
dbg_xfrin("Failed to remove NSEC3 node from zone!\n");
return KNOT_ENONODE;
}
zone_node->owner->node = NULL;
free(zone_node);
changes->old_nsec3[i] = NULL;
}
......@@ -3117,29 +3119,30 @@ int xfrin_finalize_updated_zone(knot_zone_contents_t *contents_copy,
* - ???
*/
dbg_xfrin("Adjusting zone contents.\n");
dbg_xfrin_verb("Old contents apex: %p, new apex: %p\n",
old_contents->apex, contents_copy->apex);
int ret = knot_zone_contents_adjust(contents_copy, NULL, NULL);
/*
* Select and remove empty nodes from zone trees. Do not free them right
* away as they may be referenced by some domain names.
*/
int ret = xfrin_remove_empty_nodes(contents_copy, changes);
if (ret != KNOT_EOK) {
dbg_xfrin("Failed to finalize zone contents: %s\n",
dbg_xfrin("Failed to remove empty nodes: %s\n",
knot_strerror(ret));
// xfrin_rollback_update(old_contents, &contents_copy, &changes);
return ret;
}
assert(knot_zone_contents_apex(contents_copy) != NULL);
/*
* Select and remove empty nodes from zone trees. Do not free them right
* away as they may be referenced by some domain names.
*/
ret = xfrin_remove_empty_nodes(contents_copy, changes);
dbg_xfrin("Adjusting zone contents.\n");
dbg_xfrin_verb("Old contents apex: %p, new apex: %p\n",
old_contents->apex, contents_copy->apex);
ret = knot_zone_contents_adjust(contents_copy, NULL, NULL);
if (ret != KNOT_EOK) {
dbg_xfrin("Failed to remove empty nodes: %s\n",
dbg_xfrin("Failed to finalize zone contents: %s\n",
knot_strerror(ret));
// xfrin_rollback_update(old_contents, &contents_copy, &changes);
return ret;
}
assert(knot_zone_contents_apex(contents_copy) != NULL);
dbg_xfrin("Checking zone for CNAME loops.\n");
ret = knot_zone_contents_check_loops(contents_copy);
......
......@@ -207,9 +207,9 @@ static void knot_zone_contents_adjust_rdata_dname(knot_zone_contents_t *zone,
knot_node_t *node,
knot_dname_t **in_dname)
{
const knot_node_t *old_dname_node = (*in_dname)->node;
// const knot_node_t *old_dname_node = (*in_dname)->node;
knot_zone_contents_insert_dname_into_table(in_dname, lookup_tree);
assert((*in_dname)->node == old_dname_node || old_dname_node == NULL);
// assert((*in_dname)->node == old_dname_node || old_dname_node == NULL);
knot_dname_t *dname = *in_dname;
/*
......@@ -397,9 +397,9 @@ dbg_zone_exec_detail(
knot_node_set_deleg_point(node);
}
const knot_node_t *old_dname_node = node->owner->node;
// const knot_node_t *old_dname_node = node->owner->node;
knot_zone_contents_insert_dname_into_table(&node->owner, lookup_tree);
assert(node->owner->node == old_dname_node || old_dname_node == NULL);
// assert(node->owner->node == old_dname_node || old_dname_node == NULL);
// assure that owner has proper node
if (knot_dname_node(knot_node_owner(node)) == NULL) {
......
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