Skip to content
Snippets Groups Projects
Commit 57f50a7e authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Merge remote branch 'origin/dnslib-new' into ldns-to-dnslib

parents 7e5809be c599c704
No related branches found
No related tags found
No related merge requests found
......@@ -188,7 +188,7 @@ static void dnslib_zone_adjust_node_in_tree(dnslib_node_t *node, void *data)
/* API functions */
/*----------------------------------------------------------------------------*/
dnslib_zone_t *dnslib_zone_new(dnslib_node_t *apex)
dnslib_zone_t *dnslib_zone_new(dnslib_node_t *apex, uint node_count)
{
if (apex == NULL) {
return NULL;
......@@ -215,6 +215,8 @@ dnslib_zone_t *dnslib_zone_new(dnslib_node_t *apex)
return NULL;
}
zone->node_count = node_count;
TREE_INIT(zone->tree, dnslib_node_compare);
TREE_INIT(zone->nsec3_nodes, dnslib_node_compare);
......
......@@ -44,10 +44,11 @@ typedef struct dnslib_zone dnslib_zone_t;
* \brief Creates new DNS zone.
*
* \param apex Node representing the zone apex.
* \param node_count Number of authorative nodes in the zone.
*
* \return The initialized zone structure or NULL if an error occured.
*/
dnslib_zone_t *dnslib_zone_new(dnslib_node_t *apex);
dnslib_zone_t *dnslib_zone_new(dnslib_node_t *apex, uint node_count);
/*!
* \brief Adds a node to the given zone.
......
......@@ -63,7 +63,7 @@ static int test_zone_create(dnslib_zone_t **zone)
return 0;
}
*zone = dnslib_zone_new(node);
*zone = dnslib_zone_new(node, 0);
if ((*zone) == NULL) {
diag("zone: Failed to create zone.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment