From 7e4cda9965e2edf2ec43c57967eec8eff7061ab0 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 20 Nov 2000 21:58:01 +0000 Subject: [PATCH] renamed rdata_valid() to rdata_validate() and commented it --- lib/dns/rdata.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index cd2a7fcd49..3b7a4c71a5 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.131 2000/11/20 21:41:53 bwelling Exp $ */ +/* $Id: rdata.c,v 1.132 2000/11/20 21:58:01 gson Exp $ */ #include #include @@ -534,8 +534,13 @@ dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx, return (result); } +/* + * If the binary data in 'src' is valid uncompressed wire format + * rdata of class 'rdclass' and type 'type', return ISC_R_SUCCESS + * and copy the validated rdata to 'dest'. Otherwise return an error. + */ static isc_result_t -rdata_valid(isc_buffer_t *src, isc_buffer_t *dest, dns_rdataclass_t rdclass, +rdata_validate(isc_buffer_t *src, isc_buffer_t *dest, dns_rdataclass_t rdclass, dns_rdatatype_t type) { dns_decompress_t dctx; @@ -579,7 +584,7 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type, } if (dns_rdatatype_isknown(type)) { - result = rdata_valid(buf, target, rdclass, type); + result = rdata_validate(buf, target, rdclass, type); } else { isc_region_t r; isc_buffer_usedregion(buf, &r);