mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Replace dns_rbt_namefromnode with dns_name_copy
The name will be stored inside the node now so we can just copy it. These are leftovers, most of the namefromnode code has been replaced already in previous commits.
This commit is contained in:
@@ -2021,8 +2021,7 @@ getsigningtime(dns_db_t *db, dns_rdataset_t *rdataset,
|
|||||||
rdataset DNS__DB_FLARG_PASS);
|
rdataset DNS__DB_FLARG_PASS);
|
||||||
|
|
||||||
if (foundname != NULL) {
|
if (foundname != NULL) {
|
||||||
dns_rbt_fullnamefromnode(QPDB_HEADERNODE(header),
|
dns_name_copy(QPDB_HEADERNODE(header)->name, foundname);
|
||||||
foundname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NODE_UNLOCK(&qpdb->node_locks[locknum].lock, &nlocktype);
|
NODE_UNLOCK(&qpdb->node_locks[locknum].lock, &nlocktype);
|
||||||
|
@@ -1037,19 +1037,17 @@ clean_zone_node(dns_rbtnode_t *node, uint32_t least_serial) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
delete_node(dns_qpdb_t *qpdb, dns_rbtnode_t *node) {
|
delete_node(dns_qpdb_t *qpdb, dns_rbtnode_t *node) {
|
||||||
dns_name_t *name = NULL;
|
|
||||||
isc_result_t result = ISC_R_UNEXPECTED;
|
isc_result_t result = ISC_R_UNEXPECTED;
|
||||||
|
|
||||||
INSIST(!ISC_LINK_LINKED(node, deadlink));
|
INSIST(!ISC_LINK_LINKED(node, deadlink));
|
||||||
|
|
||||||
if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
|
if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(1))) {
|
||||||
char printname[DNS_NAME_FORMATSIZE];
|
char printname[DNS_NAME_FORMATSIZE];
|
||||||
|
dns_name_format(node->name, printname, sizeof(printname));
|
||||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
|
isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
|
||||||
DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
|
DNS_LOGMODULE_CACHE, ISC_LOG_DEBUG(1),
|
||||||
"delete_node(): %p %s (bucket %d)", node,
|
"delete_node(): %p %s (bucket %d)", node,
|
||||||
dns_rbt_formatnodename(node, printname,
|
printname, node->locknum);
|
||||||
sizeof(printname)),
|
|
||||||
node->locknum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (node->nsec) {
|
switch (node->nsec) {
|
||||||
@@ -3707,7 +3705,6 @@ isc_result_t
|
|||||||
dns__qpdb_nodefullname(dns_db_t *db, dns_dbnode_t *node, dns_name_t *name) {
|
dns__qpdb_nodefullname(dns_db_t *db, dns_dbnode_t *node, dns_name_t *name) {
|
||||||
dns_qpdb_t *qpdb = (dns_qpdb_t *)db;
|
dns_qpdb_t *qpdb = (dns_qpdb_t *)db;
|
||||||
dns_rbtnode_t *rbtnode = (dns_rbtnode_t *)node;
|
dns_rbtnode_t *rbtnode = (dns_rbtnode_t *)node;
|
||||||
isc_result_t result;
|
|
||||||
isc_rwlocktype_t tlocktype = isc_rwlocktype_none;
|
isc_rwlocktype_t tlocktype = isc_rwlocktype_none;
|
||||||
|
|
||||||
REQUIRE(VALID_QPDB(qpdb));
|
REQUIRE(VALID_QPDB(qpdb));
|
||||||
@@ -3715,10 +3712,10 @@ dns__qpdb_nodefullname(dns_db_t *db, dns_dbnode_t *node, dns_name_t *name) {
|
|||||||
REQUIRE(name != NULL);
|
REQUIRE(name != NULL);
|
||||||
|
|
||||||
TREE_RDLOCK(&qpdb->tree_lock, &tlocktype);
|
TREE_RDLOCK(&qpdb->tree_lock, &tlocktype);
|
||||||
result = dns_rbt_fullnamefromnode(rbtnode, name);
|
dns_name_copy(rbtnode->name, name);
|
||||||
TREE_UNLOCK(&qpdb->tree_lock, &tlocktype);
|
TREE_UNLOCK(&qpdb->tree_lock, &tlocktype);
|
||||||
|
|
||||||
return (result);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
|
Reference in New Issue
Block a user