diff --git a/CHANGES b/CHANGES index 5b7a780143..33a6c0e5e5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ + 241. [cleanup] nscount and soacount have been removed from the + dns_master_*() arguement lists. + 240. [func] databases now come in three flavours: zone, cache and stub. diff --git a/bin/tests/master/t_master.c b/bin/tests/master/t_master.c index f4dc478485..16cd49185d 100644 --- a/bin/tests/master/t_master.c +++ b/bin/tests/master/t_master.c @@ -71,8 +71,6 @@ test_master(char *testfile, char *origin, char *class, isc_result_t exp_result) isc_buffer_t source; isc_buffer_t target; unsigned char name_buf[BUFLEN]; - int soacount; - int nscount; dns_rdatacallbacks_t callbacks; dns_rdataclass_t rdataclass; isc_textregion_t textregion; @@ -119,8 +117,6 @@ test_master(char *testfile, char *origin, char *class, isc_result_t exp_result) &dns_origin, rdataclass, ISC_TRUE, - &soacount, - &nscount, &callbacks, T1_mctx); diff --git a/lib/dns/db.c b/lib/dns/db.c index 5a047493b6..8d017231c4 100644 --- a/lib/dns/db.c +++ b/lib/dns/db.c @@ -236,7 +236,6 @@ dns_db_endload(dns_db_t *db, dns_dbload_t **dbloadp) { isc_result_t dns_db_load(dns_db_t *db, const char *filename) { isc_result_t result, eresult; - int soacount, nscount; dns_rdatacallbacks_t callbacks; isc_boolean_t age_ttl = ISC_FALSE; @@ -255,7 +254,7 @@ dns_db_load(dns_db_t *db, const char *filename) { if (result != ISC_R_SUCCESS) return (result); result = dns_master_loadfile(filename, &db->origin, &db->origin, - db->rdclass, age_ttl, &soacount, &nscount, + db->rdclass, age_ttl, &callbacks, db->mctx); eresult = dns_db_endload(db, &callbacks.add_private); /* diff --git a/lib/dns/include/dns/master.h b/lib/dns/include/dns/master.h index 78f24873d5..ed3ac95076 100644 --- a/lib/dns/include/dns/master.h +++ b/lib/dns/include/dns/master.h @@ -40,8 +40,6 @@ dns_master_loadfile(const char *master_file, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, - int *nscount, dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx); @@ -51,8 +49,6 @@ dns_master_loadstream(FILE *stream, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, - int *nscount, dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx); @@ -62,8 +58,6 @@ dns_master_loadbuffer(isc_buffer_t *buffer, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, - int *nscount, dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx); @@ -84,8 +78,6 @@ dns_master_loadbuffer(isc_buffer_t *buffer, * 'master_file' to point to a valid string. * 'top' to point to a valid name. * 'origin' to point to a valid name. - * 'soacount' to point to a int. - * 'nscount' to point to a int. * 'callbacks->commit' to point ta a valid function. * 'callbacks->error' to point ta a valid function. * 'callbacks->warn' to point ta a valid function. diff --git a/lib/dns/master.c b/lib/dns/master.c index 22783b9e2c..09d64a2eda 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: master.c,v 1.53 2000/05/24 15:07:55 tale Exp $ */ +/* $Id: master.c,v 1.54 2000/06/07 03:30:00 marka Exp $ */ #include @@ -87,8 +87,8 @@ typedef struct { static isc_result_t loadfile(const char *master_file, dns_name_t *top, dns_name_t *origin, - dns_rdataclass_t zclass, isc_boolean_t age_ttl, int *soacount, - int *nscount, dns_rdatacallbacks_t *callbacks, loadctx_t *ctx, + dns_rdataclass_t zclass, isc_boolean_t age_ttl, + dns_rdatacallbacks_t *callbacks, loadctx_t *ctx, isc_mem_t *mctx); static isc_result_t @@ -170,8 +170,7 @@ loadctx_init(loadctx_t *ctx) { static isc_result_t load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, int *nscount, dns_rdatacallbacks_t *callbacks, - loadctx_t *ctx, isc_mem_t *mctx) + dns_rdatacallbacks_t *callbacks, loadctx_t *ctx, isc_mem_t *mctx) { dns_rdataclass_t rdclass; dns_rdatatype_t type, covers; @@ -224,8 +223,6 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, REQUIRE(callbacks->add != NULL); REQUIRE(callbacks->error != NULL); REQUIRE(callbacks->warn != NULL); - REQUIRE(nscount != NULL); - REQUIRE(soacount != NULL); REQUIRE(mctx != NULL); dns_name_init(¤t_name, NULL); @@ -353,8 +350,6 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, &origin_name, zclass, age_ttl, - soacount, - nscount, callbacks, ctx, mctx); @@ -454,8 +449,6 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, &new_name, zclass, age_ttl, - soacount, - nscount, callbacks, ctx, mctx); @@ -842,13 +835,9 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin, } static isc_result_t -loadfile(const char *master_file, dns_name_t *top, - dns_name_t *origin, +loadfile(const char *master_file, dns_name_t *top, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, int *nscount, - dns_rdatacallbacks_t *callbacks, - loadctx_t *ctx, - isc_mem_t *mctx) + dns_rdatacallbacks_t *callbacks, loadctx_t *ctx, isc_mem_t *mctx) { isc_result_t result; isc_lex_t *lex = NULL; @@ -865,30 +854,26 @@ loadfile(const char *master_file, dns_name_t *top, return (result); } - return (load(lex, top, origin, zclass, age_ttl, soacount, nscount, - callbacks, ctx, mctx)); + return (load(lex, top, origin, zclass, age_ttl, callbacks, ctx, mctx)); } isc_result_t dns_master_loadfile(const char *master_file, dns_name_t *top, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, int *nscount, - dns_rdatacallbacks_t *callbacks, - isc_mem_t *mctx) + dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx) { loadctx_t ctx; loadctx_init(&ctx); return (loadfile(master_file, top, origin, zclass, age_ttl, - soacount, nscount, callbacks, &ctx, mctx)); + callbacks, &ctx, mctx)); } isc_result_t dns_master_loadstream(FILE *stream, dns_name_t *top, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, int *nscount, dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx) { isc_result_t result; @@ -909,7 +894,7 @@ dns_master_loadstream(FILE *stream, dns_name_t *top, dns_name_t *origin, return (result); } - return (load(lex, top, origin, zclass, age_ttl, soacount, nscount, + return (load(lex, top, origin, zclass, age_ttl, callbacks, &ctx, mctx)); } @@ -917,7 +902,6 @@ isc_result_t dns_master_loadbuffer(isc_buffer_t *buffer, dns_name_t *top, dns_name_t *origin, dns_rdataclass_t zclass, isc_boolean_t age_ttl, - int *soacount, int *nscount, dns_rdatacallbacks_t *callbacks, isc_mem_t *mctx) { isc_result_t result; @@ -938,7 +922,7 @@ dns_master_loadbuffer(isc_buffer_t *buffer, dns_name_t *top, return (result); } - return (load(lex, top, origin, zclass, age_ttl, soacount, nscount, + return (load(lex, top, origin, zclass, age_ttl, callbacks, &ctx, mctx)); } diff --git a/lib/dns/rootns.c b/lib/dns/rootns.c index d24c14a218..690a705bc3 100644 --- a/lib/dns/rootns.c +++ b/lib/dns/rootns.c @@ -67,7 +67,6 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, isc_result_t result, eresult; isc_buffer_t source; size_t len; - int soacount, nscount; dns_rdatacallbacks_t callbacks; dns_db_t *db = NULL; @@ -93,10 +92,9 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, * Load the hints from the specified filename. */ result = dns_master_loadfile(filename, &db->origin, - &db->origin, - db->rdclass, ISC_FALSE, - &soacount, &nscount, &callbacks, - db->mctx); + &db->origin, + db->rdclass, ISC_FALSE, + &callbacks, db->mctx); } else if (rdclass == dns_rdataclass_in) { /* * Default to using the Internet root servers. @@ -104,8 +102,7 @@ dns_rootns_create(isc_mem_t *mctx, dns_rdataclass_t rdclass, result = dns_master_loadbuffer(&source, &db->origin, &db->origin, db->rdclass, ISC_FALSE, - &soacount, &nscount, &callbacks, - db->mctx); + &callbacks, db->mctx); } else result = ISC_R_NOTFOUND; eresult = dns_db_endload(db, &callbacks.add_private);