2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

add rdataset cloning

This commit is contained in:
Bob Halley
1999-07-13 01:50:22 +00:00
parent ef4b66d355
commit 1c724c986d
4 changed files with 71 additions and 4 deletions

View File

@@ -27,12 +27,14 @@ static void disassociate(dns_rdataset_t *rdatasetp);
static dns_result_t first(dns_rdataset_t *rdataset);
static dns_result_t next(dns_rdataset_t *rdataset);
static void current(dns_rdataset_t *rdataset, dns_rdata_t *rdata);
static void clone(dns_rdataset_t *source, dns_rdataset_t *target);
static dns_rdatasetmethods_t methods = {
disassociate,
first,
next,
current
current,
clone
};
dns_result_t
@@ -104,3 +106,13 @@ current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
*rdata = *list_rdata;
ISC_LINK_INIT(rdata, link);
}
static void
clone(dns_rdataset_t *source, dns_rdataset_t *target) {
*target = *source;
/*
* Reset iterator state.
*/
target->private2 = NULL;
}