#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.9 2000/07/17 20:51:11 mellon Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.10 2000/10/12 09:04:24 mellon Exp $";
#endif /* not lint */
/*
if ((rcode = get_glue(statp, class, &nsrrs)) == ns_r_noerror)
n = satisfy(statp, mname, &nsrrs, addrs, naddrs);
+ /* If we found the zone, cache it. */
+ if (n > 0)
+ cache_found_zone (class, zname, addrs, n);
done:
DPRINTF(("FINISH n=%d (%s)", n, (n < 0) ? strerror(errno) : "OK"));
free_nsrrset(&nsrrs);
/* Is there an SOA? */
rcode = do_query(statp, dname, class, ns_t_soa,
resp, &msg, &n);
- if (rcode != ns_r_noerror) {
+ if (n < 0) {
DPRINTF(("get_soa: do_query('%s', %s) failed (%d)",
dname, p_class(class), n));
return rcode;