* kdb_db2.c (krb5_db2_db_iterate_ext): Don't call bt_rseq if HAVE_BT_RSEQ is
authorKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 22:25:28 +0000 (22:25 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 13 Sep 2002 22:25:28 +0000 (22:25 +0000)
undefined; instead, just return an error.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14850 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/ChangeLog
src/lib/kdb/kdb_db2.c

index ea253e3fc295a77ab8ea97c36a0000b8d8ac0ba7..893a77a985c8690aff10cf8bd9da35e26c6f7684 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-13  Ken Raeburn  <raeburn@mit.edu>
+
+       * kdb_db2.c (krb5_db2_db_iterate_ext): Don't call bt_rseq if
+       HAVE_BT_RSEQ is undefined; instead, just return an error.
+
 2002-08-29  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in: Revert $(S)=>/ change, for Windows support.
index c9c6e1f7450dc710903933714c97e258102f094e..f07845a14e5858991d1167b3a48310455b49cfca 100644 (file)
@@ -1154,8 +1154,13 @@ krb5_db2_db_iterate_ext(context, func, func_arg, backwards, recursive)
        dbret = (*db->seq)(db, &key, &contents,
                           backwards ? R_LAST : R_FIRST);
     } else {
+#ifdef HAVE_BT_RSEQ
        dbret = bt_rseq(db, &key, &contents, &cookie,
                        backwards ? R_LAST : R_FIRST);
+#else
+       (void)krb5_db2_db_unlock(context);
+       return KRB5_KDB_UK_RERROR; /* Not optimal, but close enough. */
+#endif
     }
     while (dbret == 0) {
        contdata.data = contents.data;
@@ -1171,8 +1176,13 @@ krb5_db2_db_iterate_ext(context, func, func_arg, backwards, recursive)
            dbret = (*db->seq)(db, &key, &contents,
                               backwards ? R_PREV : R_NEXT);
        } else {
+#ifdef HAVE_BT_RSEQ
            dbret = bt_rseq(db, &key, &contents, &cookie,
                            backwards ? R_PREV : R_NEXT);
+#else
+           (void)krb5_db2_db_unlock(context);
+           return KRB5_KDB_UK_RERROR; /* Not optimal, but close enough. */
+#endif
        }
     }
     switch (dbret) {