update to 9.7.1-P2
[tridge/bind9.git] / lib / dns / sdb.c
index 03fca9ed63e66d6e84f96c88ed9bc8862d9dbfaf..2e15b78b44665614c4dd7df22b0972d7c1790d9b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. ("ISC")
  * Copyright (C) 2000, 2001, 2003  Internet Software Consortium.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: sdb.c,v 1.66.48.2 2009/04/21 23:47:18 tbox Exp $ */
+/* $Id: sdb.c,v 1.71.54.2 2010/02/25 05:25:53 tbox Exp $ */
 
 /*! \file */
 
@@ -450,7 +450,7 @@ getnode(dns_sdballnodes_t *allnodes, const char *name, dns_sdbnode_t **nodep) {
        isc_buffer_init(&b, name, strlen(name));
        isc_buffer_add(&b, strlen(name));
 
-       result = dns_name_fromtext(newname, &b, origin, ISC_FALSE, NULL);
+       result = dns_name_fromtext(newname, &b, origin, 0, NULL);
        if (result != ISC_R_SUCCESS)
                return (result);
 
@@ -1260,7 +1260,7 @@ static dns_dbmethods_t sdb_methods = {
        NULL,
        NULL,
        NULL,
-       NULL
+       NULL,
 };
 
 static isc_result_t
@@ -1387,6 +1387,8 @@ static dns_rdatasetmethods_t methods = {
        NULL,
        NULL,
        NULL,
+       NULL,
+       NULL,
        NULL
 };
 
@@ -1458,9 +1460,11 @@ dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) {
        sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
 
        sdbiter->current = ISC_LIST_HEAD(sdbiter->nodelist);
-       while (sdbiter->current != NULL)
+       while (sdbiter->current != NULL) {
                if (dns_name_equal(sdbiter->current->name, name))
                        return (ISC_R_SUCCESS);
+               sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
+       }
        return (ISC_R_NOTFOUND);
 }