]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Use result code from res_findzonecut.
authorTed Lemon <source@isc.org>
Thu, 6 Jul 2000 06:23:09 +0000 (06:23 +0000)
committerTed Lemon <source@isc.org>
Thu, 6 Jul 2000 06:23:09 +0000 (06:23 +0000)
minires/res_update.c

index 4612d814d30b6f71eae4a6e66b7aadd12e274e31..eeda3454fde20669b9ecb226b28ff6fa48d74000 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_update.c,v 1.6 2000/05/01 23:46:39 mellon Exp $";
+static const char rcsid[] = "$Id: res_update.c,v 1.7 2000/07/06 06:23:09 mellon Exp $";
 #endif /* not lint */
 
 /*
@@ -98,12 +98,14 @@ res_nupdate(res_state statp, ns_updrec *rrecp_in) {
        for (rrecp = rrecp_in; rrecp; rrecp = ISC_LIST_NEXT(rrecp, r_link)) {
                /* Find the origin for it if there is one. */
                tgrp.z_class = rrecp->r_class;
-               tgrp.z_nscount =
-                       res_findzonecut(statp, rrecp->r_dname, tgrp.z_class,
+               rcode = res_findzonecut(statp, rrecp->r_dname, tgrp.z_class,
                                        RES_EXHAUSTIVE,
                                        tgrp.z_origin,
                                        sizeof tgrp.z_origin,
-                                       tgrp.z_nsaddrs, MAXNS, zcookp);
+                                       tgrp.z_nsaddrs, MAXNS, &tgrp.z_nscount,
+                                       zcookp);
+               if (rcode != ns_r_noerror)
+                       goto done;
                if (tgrp.z_nscount <= 0) {
                        rcode = ns_r_notzone;
                        goto done;