Commit 0380c44d authored by Mark Andrews's avatar Mark Andrews
Browse files

241. [cleanup] nscount and soacount have been removed from the

			dns_master_*() arguement lists.
parent 265086fc
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.
......
......@@ -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);
......
......@@ -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);
/*
......
......@@ -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.
......
......@@ -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 <config.h>
......@@ -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(&current_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));
}
......
......@@ -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);
......
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