mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
clarify dns_rdataslab_fromrdataset()
there are now two functions for creating an rdataslab from an rdataset: dns_rdataslab_fromrdataset() creates a full slab (including space for a slab header), and dns_rdataslab_raw_fromrdataset() creates a raw slab.
This commit is contained in:
@@ -3090,12 +3090,13 @@ addnoqname(isc_mem_t *mctx, dns_slabheader_t *newheader, uint32_t maxrrperset,
|
||||
result = dns_rdataset_getnoqname(rdataset, &name, &neg, &negsig);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
result = dns_rdataslab_fromrdataset(&neg, mctx, &r1, 0, maxrrperset);
|
||||
result = dns_rdataslab_raw_fromrdataset(&neg, mctx, &r1, maxrrperset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = dns_rdataslab_fromrdataset(&negsig, mctx, &r2, 0, maxrrperset);
|
||||
result = dns_rdataslab_raw_fromrdataset(&negsig, mctx, &r2,
|
||||
maxrrperset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -3129,12 +3130,13 @@ addclosest(isc_mem_t *mctx, dns_slabheader_t *newheader, uint32_t maxrrperset,
|
||||
result = dns_rdataset_getclosest(rdataset, &name, &neg, &negsig);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
result = dns_rdataslab_fromrdataset(&neg, mctx, &r1, 0, maxrrperset);
|
||||
result = dns_rdataslab_raw_fromrdataset(&neg, mctx, &r1, maxrrperset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = dns_rdataslab_fromrdataset(&negsig, mctx, &r2, 0, maxrrperset);
|
||||
result = dns_rdataslab_raw_fromrdataset(&negsig, mctx, &r2,
|
||||
maxrrperset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -3184,8 +3186,7 @@ qpcache_addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
REQUIRE(version == NULL);
|
||||
|
||||
result = dns_rdataslab_fromrdataset(rdataset, qpdb->common.mctx,
|
||||
®ion, sizeof(dns_slabheader_t),
|
||||
qpdb->maxrrperset);
|
||||
®ion, qpdb->maxrrperset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_TOOMANYRECORDS) {
|
||||
dns__db_logtoomanyrecords((dns_db_t *)qpdb,
|
||||
|
Reference in New Issue
Block a user