Commit 389c749a authored by Mark Andrews's avatar Mark Andrews
Browse files

530. [func] New function dns_rdata_invalidate().

parent 355b3c2e
530. [func] New function dns_rdata_invalidate().
529. [bug] 521 contained a bug which caused zones to always
reload. [RT #410]
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.h,v 1.43 2000/10/20 13:22:36 marka Exp $ */
/* $Id: rdata.h,v 1.44 2000/10/24 02:03:33 marka Exp $ */
#ifndef DNS_RDATA_H
#define DNS_RDATA_H 1
......@@ -153,6 +153,15 @@ dns_rdata_init(dns_rdata_t *rdata);
* 'rdata' is a valid rdata (i.e. not NULL, points to a struct dns_rdata)
*/
void
dns_rdata_invalidate(dns_rdata_t *rdata);
/*
* Make 'rdata' empty.
*
* Requires:
* 'rdata' is a previously initaliased rdata and is not linked.
*/
void
dns_rdata_clone(dns_rdata_t *src, dns_rdata_t *target);
/*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.111 2000/10/20 13:22:35 marka Exp $ */
/* $Id: rdata.c,v 1.112 2000/10/24 02:03:32 marka Exp $ */
#include <config.h>
#include <ctype.h>
......@@ -330,6 +330,18 @@ dns_rdata_init(dns_rdata_t *rdata) {
/* ISC_LIST_INIT(rdata->list); */
}
void
dns_rdata_invalidate(dns_rdata_t *rdata) {
REQUIRE(!ISC_LINK_LINKED(rdata, link));
rdata->data = NULL;
rdata->length = 0;
rdata->rdclass = 0;
rdata->type = 0;
rdata->flags = 0;
}
void
dns_rdata_clone(dns_rdata_t *src, dns_rdata_t *target) {
target->data = src->data;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment