summaryrefslogtreecommitdiff
path: root/minires
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2000-07-06 06:22:36 +0000
committerTed Lemon <source@isc.org>2000-07-06 06:22:36 +0000
commit10a19b8c370b02fa22ec1e1fbdc1d30ed9cb5d69 (patch)
tree187afdd3becef69418f16f008be7a61049bccb65 /minires
parent1fbc2371d149b18657c9d687b4aa19831ec138a6 (diff)
downloadisc-dhcp-10a19b8c370b02fa22ec1e1fbdc1d30ed9cb5d69.tar.gz
Return record count as well as result code.
Diffstat (limited to 'minires')
-rw-r--r--minires/res_findzonecut.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/minires/res_findzonecut.c b/minires/res_findzonecut.c
index f17be86c..08be2cfc 100644
--- a/minires/res_findzonecut.c
+++ b/minires/res_findzonecut.c
@@ -1,5 +1,5 @@
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.6 2000/07/05 07:28:46 mellon Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.7 2000/07/06 06:22:36 mellon Exp $";
#endif /* not lint */
/*
@@ -136,15 +136,14 @@ static ns_rcode do_query(res_state, const char *, ns_class, ns_type,
ns_rcode
res_findzonecut(res_state statp, const char *dname, ns_class class, int opts,
char *zname, size_t zsize, struct in_addr *addrs, int naddrs,
- void *zcookie)
+ int *count, void *zcookie)
{
char mname[NS_MAXDNAME];
u_long save_pfcode;
rrset_ns nsrrs;
- int n;
+ int n = 0;
ns_rcode rcode;
-
DPRINTF(("START dname='%s' class=%s, zsize=%ld, naddrs=%d",
dname, p_class(class), (long)zsize, naddrs));
save_pfcode = statp->pfcode;
@@ -179,6 +178,8 @@ res_findzonecut(res_state statp, const char *dname, ns_class class, int opts,
DPRINTF(("FINISH n=%d (%s)", n, (n < 0) ? strerror(errno) : "OK"));
free_nsrrset(&nsrrs);
statp->pfcode = save_pfcode;
+ if (count)
+ *count = n;
return rcode;
}