Commit 368b37b6 authored by Mark Andrews's avatar Mark Andrews
Browse files

dns_rdata_invalidate -> dns_rdata_reset

parent 04c22cea
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.123 2000/10/25 04:26:12 marka Exp $ */
/* $Id: dig.c,v 1.124 2000/10/31 03:21:35 marka Exp $ */
#include <config.h>
#include <stdlib.h>
......@@ -314,7 +314,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
buf);
check_result(result, "say_message");
loopresult = dns_rdataset_next(rdataset);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
}
}
result = dns_message_nextname(msg, DNS_SECTION_ANSWER);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.158 2000/10/25 04:26:13 marka Exp $ */
/* $Id: dighost.c,v 1.159 2000/10/31 03:21:36 marka Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
......@@ -1093,7 +1093,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query,
srv, link);
isc_buffer_free(&b);
}
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
loopresult = dns_rdataset_next(rdataset);
}
}
......@@ -2110,7 +2110,7 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
query->rr_count++;
if (query->rr_count >= rr_limit)
atlimit = ISC_TRUE;
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
/*
* If this is the first rr, make sure
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.58 2000/10/25 04:26:14 marka Exp $ */
/* $Id: host.c,v 1.59 2000/10/31 03:21:38 marka Exp $ */
#include <config.h>
#include <stdlib.h>
......@@ -355,7 +355,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
rtt = "unknown";
say_message(print_name, rtt,
&rdata, query);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
loopresult =
dns_rdataset_next(rdataset);
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.62 2000/10/25 06:17:56 marka Exp $ */
/* $Id: nslookup.c,v 1.63 2000/10/31 03:21:39 marka Exp $ */
#include <config.h>
......@@ -327,7 +327,7 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
}
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
loopresult = dns_rdataset_next(rdataset);
}
}
......@@ -467,7 +467,7 @@ detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
}
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
loopresult = dns_rdataset_next(rdataset);
}
}
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.40 2000/10/25 04:26:17 marka Exp $ */
/* $Id: dnssec-signkey.c,v 1.41 2000/10/31 03:21:40 marka Exp $ */
#include <config.h>
......@@ -105,7 +105,7 @@ loadkeys(dns_name_t *name, dns_rdataset_t *rdataset) {
result = dns_rdataset_first(rdataset);
check_result(result, "dns_rdataset_first");
for (; result == ISC_R_SUCCESS; result = dns_rdataset_next(rdataset)) {
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
key = NULL;
result = dns_dnssec_keyfromrdata(name, &rdata, mctx, &key);
......@@ -321,7 +321,7 @@ main(int argc, char *argv[]) {
fatal("signature by key '%s' did not verify: %s",
keystr, isc_result_totext(result));
}
dns_rdata_invalidate(&sigrdata);
dns_rdata_reset(&sigrdata);
dns_rdata_freestruct(&sig);
result = dns_rdataset_next(&sigrdataset);
} while (result == ISC_R_SUCCESS);
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.110 2000/10/28 22:56:25 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.111 2000/10/31 03:21:41 marka Exp $ */
#include <config.h>
......@@ -396,7 +396,7 @@ signset(dns_db_t *db, dns_dbversion_t *version, dns_diff_t *diff,
dns_diff_append(diff, &tuple);
}
dns_rdata_invalidate(&sigrdata);
dns_rdata_reset(&sigrdata);
dns_rdata_freestruct(&sig);
result = dns_rdataset_next(&sigset);
}
......@@ -543,12 +543,12 @@ importparentsig(dns_db_t *db, dns_diff_t *diff, dns_name_t *name,
dns_rdataset_current(&newset, &newrdata);
if (dns_rdata_compare(&rdata, &newrdata) == 0)
break;
dns_rdata_invalidate(&newrdata);
dns_rdata_reset(&newrdata);
}
if (result != ISC_R_SUCCESS)
break;
dns_rdata_invalidate(&newrdata);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&newrdata);
dns_rdata_reset(&rdata);
}
if (result != ISC_R_NOMORE)
goto failure;
......@@ -633,7 +633,7 @@ haschildkey(dns_db_t *db, dns_name_t *name) {
found = ISC_TRUE;
break;
}
dns_rdata_invalidate(&sigrdata);
dns_rdata_reset(&sigrdata);
}
failure:
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.140 2000/10/25 04:26:21 marka Exp $ */
/* $Id: query.c,v 1.141 2000/10/31 03:21:43 marka Exp $ */
#include <config.h>
......@@ -2728,7 +2728,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
goto cleanup;
dns_rdataset_current(trdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_init(tname, NULL);
......@@ -2775,7 +2775,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
goto cleanup;
dns_rdataset_current(trdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &dname, NULL);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_name_init(tname, NULL);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.232 2000/10/25 04:26:22 marka Exp $ */
/* $Id: server.c,v 1.233 2000/10/31 03:21:44 marka Exp $ */
#include <config.h>
......@@ -856,7 +856,7 @@ create_authors_zone(dns_zonemgr_t *zmgr, dns_view_t *view) {
CHECK(dns_difftuple_create(ns_g_mctx, DNS_DIFFOP_ADD, &origin,
0, &rdata, &tuple));
dns_diff_append(&diff, &tuple);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
}
CHECK(dns_diff_apply(&diff, db, dbver));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: update.c,v 1.70 2000/10/25 04:26:23 marka Exp $ */
/* $Id: update.c,v 1.71 2000/10/31 03:21:45 marka Exp $ */
#include <config.h>
......@@ -1457,7 +1457,7 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
/* XXX inefficient - will cause dataset merging */
CHECK(update_one_rr(db, ver, diff, DNS_DIFFOP_ADD, name,
rdataset.ttl, &sig_rdata));
dns_rdata_invalidate(&sig_rdata);
dns_rdata_reset(&sig_rdata);
}
failure:
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrout.c,v 1.79 2000/10/25 04:26:25 marka Exp $ */
/* $Id: xfrout.c,v 1.80 2000/10/31 03:21:47 marka Exp $ */
#include <config.h>
......@@ -241,7 +241,7 @@ db_rr_iterator_current(db_rr_iterator_t *it, dns_name_t **name,
REQUIRE(it->result == ISC_R_SUCCESS);
*name = dns_fixedname_name(&it->fixedname);
*ttl = it->rdataset.ttl;
dns_rdata_invalidate(&it->rdata);
dns_rdata_reset(&it->rdata);
dns_rdataset_current(&it->rdataset, &it->rdata);
*rdata = &it->rdata;
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a6.c,v 1.17 2000/10/25 04:26:27 marka Exp $ */
/* $Id: a6.c,v 1.18 2000/10/31 03:21:48 marka Exp $ */
#include <config.h>
......@@ -152,7 +152,7 @@ foreach(dns_a6context_t *a6ctx, dns_rdataset_t *parent, unsigned int depth,
(a6ctx->address)(a6ctx);
}
next_a6:
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
result = dns_rdataset_next(parent);
if (result == ISC_R_SUCCESS) {
a6ctx->chains++;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: adb.c,v 1.156 2000/10/25 04:26:29 marka Exp $ */
/* $Id: adb.c,v 1.157 2000/10/31 03:21:49 marka Exp $ */
/*
* Implementation notes
......@@ -507,7 +507,7 @@ import_rdataset(dns_adbname_t *adbname, dns_rdataset_t *rdataset,
nh = NULL;
result = dns_rdataset_first(rdataset);
while (result == ISC_R_SUCCESS) {
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
if (rdtype == dns_rdatatype_a) {
INSIST(rdata.length == 4);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: byaddr.c,v 1.24 2000/10/25 04:26:30 marka Exp $ */
/* $Id: byaddr.c,v 1.25 2000/10/31 03:21:50 marka Exp $ */
#include <config.h>
......@@ -154,7 +154,7 @@ copy_ptr_targets(dns_byaddr_t *byaddr, dns_rdataset_t *rdataset) {
return (ISC_R_NOMEMORY);
}
ISC_LIST_APPEND(byaddr->event->names, name, link);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset);
}
if (result == ISC_R_NOMORE)
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: dnssec.c,v 1.54 2000/10/25 04:26:32 marka Exp $
* $Id: dnssec.c,v 1.55 2000/10/31 03:21:51 marka Exp $
*/
......@@ -486,7 +486,7 @@ dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver,
count++;
next:
dst_key_free(&pubkey);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
result = dns_rdataset_next(&rdataset);
}
if (result != ISC_R_NOMORE)
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.h,v 1.45 2000/10/25 04:26:56 marka Exp $ */
/* $Id: rdata.h,v 1.46 2000/10/31 03:22:05 marka Exp $ */
#ifndef DNS_RDATA_H
#define DNS_RDATA_H 1
......@@ -156,7 +156,7 @@ dns_rdata_init(dns_rdata_t *rdata);
*/
void
dns_rdata_invalidate(dns_rdata_t *rdata);
dns_rdata_reset(dns_rdata_t *rdata);
/*
* Make 'rdata' empty.
*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: journal.c,v 1.61 2000/10/25 04:26:33 marka Exp $ */
/* $Id: journal.c,v 1.62 2000/10/31 03:21:52 marka Exp $ */
#include <config.h>
......@@ -2142,7 +2142,7 @@ read_one_rr(dns_journal_t *j) {
* Parse the rdata.
*/
isc_buffer_setactive(&j->it.source, rdlen);
dns_rdata_invalidate(&j->it.rdata);
dns_rdata_reset(&j->it.rdata);
CHECK(dns_rdata_fromwire(&j->it.rdata, rdclass,
rdtype, &j->it.source, &j->it.dctx,
ISC_FALSE, &j->it.target));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lookup.c,v 1.2 2000/10/25 04:26:34 marka Exp $ */
/* $Id: lookup.c,v 1.3 2000/10/31 03:21:54 marka Exp $ */
#include <config.h>
......@@ -220,7 +220,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
break;
dns_rdataset_current(&lookup->rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
if (result != ISC_R_SUCCESS)
break;
result = dns_name_concatenate(&cname.cname, NULL, name,
......@@ -241,7 +241,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
break;
dns_rdataset_current(&lookup->rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &dname, NULL);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
if (result != ISC_R_SUCCESS)
break;
/*
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.75 2000/10/25 04:26:36 marka Exp $ */
/* $Id: master.c,v 1.76 2000/10/31 03:21:55 marka Exp $ */
#include <config.h>
......@@ -649,7 +649,7 @@ generate(dns_loadctx_t *ctx, char *range, char *lhs, char *gtype, char *rhs) {
ISC_LIST_UNLINK(rdatalist.rdata, &rdata, link);
if (result != ISC_R_SUCCESS)
goto error_cleanup;
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
}
result = ISC_R_SUCCESS;
goto cleanup;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ncache.c,v 1.22 2000/10/25 04:26:39 marka Exp $ */
/* $Id: ncache.c,v 1.23 2000/10/31 03:21:56 marka Exp $ */
#include <config.h>
......@@ -76,7 +76,7 @@ copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) {
result = isc_buffer_copyregion(buffer, &r);
if (result != ISC_R_SUCCESS)
return (result);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset);
}
if (result != ISC_R_NOMORE)
......@@ -302,7 +302,7 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
*/
isc_buffer_remainingregion(&source, &remaining);
INSIST(remaining.length >= 2);
dns_rdata_invalidate(&rdata);
dns_rdata_reset(&rdata);
rdata.length = isc_buffer_getuint16(&source);
isc_buffer_remainingregion(&source, &remaining);
rdata.data = remaining.base;
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rdata.c,v 1.115 2000/10/27 21:29:23 bwelling Exp $ */
/* $Id: rdata.c,v 1.116 2000/10/31 03:21:57 marka Exp $ */
#include <config.h>
#include <ctype.h>
......@@ -338,7 +338,7 @@ dns_rdata_init(dns_rdata_t *rdata) {
(((rdata)->flags & ~DNS_RDATA_UPDATE) == 0)
void
dns_rdata_invalidate(dns_rdata_t *rdata) {
dns_rdata_reset(dns_rdata_t *rdata) {
REQUIRE(!ISC_LINK_LINKED(rdata, link));
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
......
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